An enumeration (enum) is a user-defined type (same as structure) that represents a group of constants. typedef is a keyword used to create alias name for the existing datatypes.
Introduction, The & and * operator, Declaration of pointer, Pointer to pointer, Pointer arithmetic, Pointer and array, Pointer with multidimensional array, Pointer and strings, Array of pointer with string, Dynamic memory allocation.
Sorting is any process of arranging items systematically, and has two common, yet distinct meanings: ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with similar properties.Common sorting algorithms. Sorting algorithm
Bubble/Shell sort: Exchange two adjacent elements if they are out of order. Repeat until array is sorted.
Insertion sort: Scan successive elements for an out-of-order item, then insert the item in the proper place.
Selection sort: Find the smallest (or biggest) element in the array, and put it in the proper place. Swap it with the value in the first position. Repeat until array is sorted.
Quick sort: Partition the array into two segments. In the first segment, all elements are less than or equal to the pivot value. In the second segment, all elements are greater than or equal to the pivot value. Finally, sort the two segments recursively.
'Merge sort': Divide the list of elements in two parts, sort the two parts individually and then merge it.
This document discusses pointers in C programming. It defines pointers as variables that store the address of another variable. It explains that pointers use the & operator to get the address of a variable and the * operator to dereference a pointer and access the value of the variable being pointed to. The document also discusses pointer arithmetic, where incrementing or decrementing a pointer moves it to the next or previous memory location. It provides an example using a float array to demonstrate pointer arithmetic and updating array elements through a pointer.
Pointers are among C’s most powerful, yet most difficult concepts to master. Some tasks like dynamic memory allocation done only by using pointers. So it is essential to learn pointers.
Pointers are a type of variable, just like int, double, etc., except instead of storing a value, they store a memory address of another variable.
Pointers in C allow variables to hold the memory addresses of other variables and data types. Pointers use the asterisk (*) and ampersand (&) operators - * accesses the value at a memory address, while & returns the memory address of a variable. Pointers are useful for passing arguments to functions, returning multiple values from functions, and accessing arrays through a single pointer variable. Pointer arithmetic increments or decrements a pointer by the size of its data type. Pointer-to-pointers allow pointers to hold the addresses of other pointer variables. Proper initialization and boundary checking is important to avoid crashes with pointers.
This document discusses different types of sorting algorithms. It describes internal sorting and external sorting, with internal sorting handling all data in memory and external sorting requiring external memory. Bubble sort, selection sort, and insertion sort are briefly explained as examples of sorting methods. Bubble sort works by comparing adjacent elements and swapping if out of order, selection sort finds the minimum element and selection sort inserts elements into the sorted position. Pseudocode and examples are provided for each algorithm.
An enumeration (enum) is a user-defined type (same as structure) that represents a group of constants. typedef is a keyword used to create alias name for the existing datatypes.
Introduction, The & and * operator, Declaration of pointer, Pointer to pointer, Pointer arithmetic, Pointer and array, Pointer with multidimensional array, Pointer and strings, Array of pointer with string, Dynamic memory allocation.
Sorting is any process of arranging items systematically, and has two common, yet distinct meanings: ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with similar properties.Common sorting algorithms. Sorting algorithm
Bubble/Shell sort: Exchange two adjacent elements if they are out of order. Repeat until array is sorted.
Insertion sort: Scan successive elements for an out-of-order item, then insert the item in the proper place.
Selection sort: Find the smallest (or biggest) element in the array, and put it in the proper place. Swap it with the value in the first position. Repeat until array is sorted.
Quick sort: Partition the array into two segments. In the first segment, all elements are less than or equal to the pivot value. In the second segment, all elements are greater than or equal to the pivot value. Finally, sort the two segments recursively.
'Merge sort': Divide the list of elements in two parts, sort the two parts individually and then merge it.
This document discusses pointers in C programming. It defines pointers as variables that store the address of another variable. It explains that pointers use the & operator to get the address of a variable and the * operator to dereference a pointer and access the value of the variable being pointed to. The document also discusses pointer arithmetic, where incrementing or decrementing a pointer moves it to the next or previous memory location. It provides an example using a float array to demonstrate pointer arithmetic and updating array elements through a pointer.
Pointers are among C’s most powerful, yet most difficult concepts to master. Some tasks like dynamic memory allocation done only by using pointers. So it is essential to learn pointers.
Pointers are a type of variable, just like int, double, etc., except instead of storing a value, they store a memory address of another variable.
Pointers in C allow variables to hold the memory addresses of other variables and data types. Pointers use the asterisk (*) and ampersand (&) operators - * accesses the value at a memory address, while & returns the memory address of a variable. Pointers are useful for passing arguments to functions, returning multiple values from functions, and accessing arrays through a single pointer variable. Pointer arithmetic increments or decrements a pointer by the size of its data type. Pointer-to-pointers allow pointers to hold the addresses of other pointer variables. Proper initialization and boundary checking is important to avoid crashes with pointers.
This document discusses different types of sorting algorithms. It describes internal sorting and external sorting, with internal sorting handling all data in memory and external sorting requiring external memory. Bubble sort, selection sort, and insertion sort are briefly explained as examples of sorting methods. Bubble sort works by comparing adjacent elements and swapping if out of order, selection sort finds the minimum element and selection sort inserts elements into the sorted position. Pseudocode and examples are provided for each algorithm.
This document discusses if and if-else statements in C++. It provides the syntax for if statements, which execute code if a test expression is true. If the expression is false, the code is skipped. It also covers if-else statements, which allow specifying different code blocks to execute depending on whether the test expression is true or false. Examples are given of programs using if and if-else statements to check if a user-input integer is positive or negative.
Content:
What is function pointer?
Motivation, what is the use cases of function pointer?
Declaration of function pointer in c
Initialization of function pointer in c
Calling a function using the function pointer
Example on function pointer
Function pointer as arguments
By:
AbuBakr Mohammed Ramadan
#AbuBakrMR
This document defines key terminology used in tree data structures. It explains that a tree is a hierarchical data structure composed of nodes connected by edges. The root node is the top node, with child nodes connected below and leaf nodes at the bottom with no children. Other terms defined include parent, sibling, internal and external nodes, degree, level, height, depth, path, and subtree.
CONSTRUCTOR AND DESTRUCTOR PPT BASED ON OOP SUBJECT ......FULLY CONCEPT EXPLAINED WITH SAMPLE PROGRAM IN IT .....FOR MORE SLIDES PLEASE FOLLOW ME ..... THANK YOU
Pointers in C store the address of another variable. They allow dynamic memory allocation at runtime and can refer to variables of any data type. Pointers help save memory space and improve performance. A pointer variable contains the address of another variable. Common pointer types include null pointers, void pointers, and wild pointers. Pointers are useful for accessing memory locations and forming complex data structures like linked lists. However, pointers also present risks like memory corruption if misused.
Union in C allows defining a data type that contains multiple members of different data types that share the same memory location. The size of the memory allocated for a union is equal to the size of its largest member. Only one member can be accessed at a time since they share the same memory location. Accessing different members can corrupt the values stored as the memory is shared.
The document discusses unions in C programming. A union is like a structure that allocates space for its members equal to the largest member. Only one member can be accessed at a time. The document provides an example union for employee data and explains memory allocation. Unions allow different variable types to share the same memory space. Structures are used for database management and other applications while unions are useful when variables need to share the same memory location.
Linked lists are linear data structures where each node points to the next. Each node contains a data field and a pointer to the next node. There are three types: singly, doubly, and circular linked lists. Linked lists allow for constant-time insertions and deletions and do not require fixed size allocation. Common operations on linked lists include insertion, deletion, searching, and traversal. Linked lists are useful for implementations like stacks, queues, and dynamic data structures.
This document discusses different uses of the "this" pointer in C++ classes. This pointer points to the object whose member function is being called. It can be used to return the object from a member function, access the memory address of the object, and access data members within member functions. Sample programs are provided to demonstrate returning an object using this, displaying the memory address of an object using this, and accessing a data member within a member function using this->.
Binary search trees are binary trees where all left descendants of a node are less than the node's value and all right descendants are greater. This structure allows for efficient search, insertion, and deletion operations. The document provides definitions and examples of binary search tree properties and operations like creation, traversal, searching, insertion, deletion, and finding minimum and maximum values. Applications include dynamically maintaining a sorted dataset to enable efficient search, insertion, and deletion.
In computer science, a pointer is a programming language object, whose value refers to (or "points to") another value stored elsewhere in the computer memory using its memory address. A pointer references a location in memory, and obtaining the value stored at that location is known as dereferencing the pointer.
The document provides an introduction to C programming, covering topics such as what a program is, programming languages, the history of C, and the development stages of a C program. It discusses the key components of a C program including preprocessing directives, the main function, and program layout. Examples are provided to illustrate C code structure and the use of variables, keywords, operators, input/output functions, and formatting output with printf.
Pointer is a variable that stores the address of another variable. The '&' operator returns the address of a variable and '*' operator accesses the value of the variable being pointed to. Pointers must be declared with a data type that matches the variable it is pointing to (e.g. int* points to an int). Pointers can point to the address of other pointers, forming a chain. To access the value of a variable through a pointer, the pointer is dereferenced with the '*' operator.
This document describes binary trees, including their definition, applications, operations like insertion, deletion and traversal. Binary trees store data in nodes that can have up to two child nodes. Common operations include inserting nodes, searching for values, and traversing the tree in different orders like inorder, preorder and postorder. The document provides code examples for implementing a binary tree class including functions for these operations.
Performance analysis(Time & Space Complexity)swapnac12
The document discusses algorithms analysis and design. It covers time complexity and space complexity analysis using approaches like counting the number of basic operations like assignments, comparisons etc. and analyzing how they vary with the size of the input. Common complexities like constant, linear, quadratic and cubic are explained with examples. Frequency count method is presented to determine tight bounds of time and space complexity of algorithms.
The document discusses functions in C programming. The key points are:
1. A function is a block of code that performs a specific task. Functions allow code reusability and modularity.
2. main() is the starting point of a C program where execution begins. User-defined functions are called from main() or other functions.
3. Functions can take arguments and return values. There are different ways functions can be defined based on these criteria.
4. Variables used within a function have local scope while global variables can be accessed from anywhere. Pointers allow passing arguments by reference.
The document provides an introduction and overview of one-dimensional, two-dimensional, and three-dimensional arrays in C++. It includes syntax examples and sample programs to demonstrate declaring, initializing, accessing, and manipulating array elements. Key concepts covered include array data types, sizes, indexes, multidimensional arrays, passing arrays to functions, and using pointers with arrays. Sample programs sort arrays and find minimum/maximum elements to illustrate common array operations.
This document provides an overview of pointers and dynamic arrays in C++. It discusses pointer variables, memory management, pointer arithmetic, array variables as pointers, functions for manipulating strings like strcpy and strcmp, and advanced pointer notation for multi-dimensional arrays. Code examples are provided to demonstrate concepts like passing pointers to functions, dereferencing pointers, pointer arithmetic on arrays, and using string functions. The overall objective is to introduce pointers and how they enable dynamic memory allocation and manipulation of data structures in C++.
This document discusses if and if-else statements in C++. It provides the syntax for if statements, which execute code if a test expression is true. If the expression is false, the code is skipped. It also covers if-else statements, which allow specifying different code blocks to execute depending on whether the test expression is true or false. Examples are given of programs using if and if-else statements to check if a user-input integer is positive or negative.
Content:
What is function pointer?
Motivation, what is the use cases of function pointer?
Declaration of function pointer in c
Initialization of function pointer in c
Calling a function using the function pointer
Example on function pointer
Function pointer as arguments
By:
AbuBakr Mohammed Ramadan
#AbuBakrMR
This document defines key terminology used in tree data structures. It explains that a tree is a hierarchical data structure composed of nodes connected by edges. The root node is the top node, with child nodes connected below and leaf nodes at the bottom with no children. Other terms defined include parent, sibling, internal and external nodes, degree, level, height, depth, path, and subtree.
CONSTRUCTOR AND DESTRUCTOR PPT BASED ON OOP SUBJECT ......FULLY CONCEPT EXPLAINED WITH SAMPLE PROGRAM IN IT .....FOR MORE SLIDES PLEASE FOLLOW ME ..... THANK YOU
Pointers in C store the address of another variable. They allow dynamic memory allocation at runtime and can refer to variables of any data type. Pointers help save memory space and improve performance. A pointer variable contains the address of another variable. Common pointer types include null pointers, void pointers, and wild pointers. Pointers are useful for accessing memory locations and forming complex data structures like linked lists. However, pointers also present risks like memory corruption if misused.
Union in C allows defining a data type that contains multiple members of different data types that share the same memory location. The size of the memory allocated for a union is equal to the size of its largest member. Only one member can be accessed at a time since they share the same memory location. Accessing different members can corrupt the values stored as the memory is shared.
The document discusses unions in C programming. A union is like a structure that allocates space for its members equal to the largest member. Only one member can be accessed at a time. The document provides an example union for employee data and explains memory allocation. Unions allow different variable types to share the same memory space. Structures are used for database management and other applications while unions are useful when variables need to share the same memory location.
Linked lists are linear data structures where each node points to the next. Each node contains a data field and a pointer to the next node. There are three types: singly, doubly, and circular linked lists. Linked lists allow for constant-time insertions and deletions and do not require fixed size allocation. Common operations on linked lists include insertion, deletion, searching, and traversal. Linked lists are useful for implementations like stacks, queues, and dynamic data structures.
This document discusses different uses of the "this" pointer in C++ classes. This pointer points to the object whose member function is being called. It can be used to return the object from a member function, access the memory address of the object, and access data members within member functions. Sample programs are provided to demonstrate returning an object using this, displaying the memory address of an object using this, and accessing a data member within a member function using this->.
Binary search trees are binary trees where all left descendants of a node are less than the node's value and all right descendants are greater. This structure allows for efficient search, insertion, and deletion operations. The document provides definitions and examples of binary search tree properties and operations like creation, traversal, searching, insertion, deletion, and finding minimum and maximum values. Applications include dynamically maintaining a sorted dataset to enable efficient search, insertion, and deletion.
In computer science, a pointer is a programming language object, whose value refers to (or "points to") another value stored elsewhere in the computer memory using its memory address. A pointer references a location in memory, and obtaining the value stored at that location is known as dereferencing the pointer.
The document provides an introduction to C programming, covering topics such as what a program is, programming languages, the history of C, and the development stages of a C program. It discusses the key components of a C program including preprocessing directives, the main function, and program layout. Examples are provided to illustrate C code structure and the use of variables, keywords, operators, input/output functions, and formatting output with printf.
Pointer is a variable that stores the address of another variable. The '&' operator returns the address of a variable and '*' operator accesses the value of the variable being pointed to. Pointers must be declared with a data type that matches the variable it is pointing to (e.g. int* points to an int). Pointers can point to the address of other pointers, forming a chain. To access the value of a variable through a pointer, the pointer is dereferenced with the '*' operator.
This document describes binary trees, including their definition, applications, operations like insertion, deletion and traversal. Binary trees store data in nodes that can have up to two child nodes. Common operations include inserting nodes, searching for values, and traversing the tree in different orders like inorder, preorder and postorder. The document provides code examples for implementing a binary tree class including functions for these operations.
Performance analysis(Time & Space Complexity)swapnac12
The document discusses algorithms analysis and design. It covers time complexity and space complexity analysis using approaches like counting the number of basic operations like assignments, comparisons etc. and analyzing how they vary with the size of the input. Common complexities like constant, linear, quadratic and cubic are explained with examples. Frequency count method is presented to determine tight bounds of time and space complexity of algorithms.
The document discusses functions in C programming. The key points are:
1. A function is a block of code that performs a specific task. Functions allow code reusability and modularity.
2. main() is the starting point of a C program where execution begins. User-defined functions are called from main() or other functions.
3. Functions can take arguments and return values. There are different ways functions can be defined based on these criteria.
4. Variables used within a function have local scope while global variables can be accessed from anywhere. Pointers allow passing arguments by reference.
The document provides an introduction and overview of one-dimensional, two-dimensional, and three-dimensional arrays in C++. It includes syntax examples and sample programs to demonstrate declaring, initializing, accessing, and manipulating array elements. Key concepts covered include array data types, sizes, indexes, multidimensional arrays, passing arrays to functions, and using pointers with arrays. Sample programs sort arrays and find minimum/maximum elements to illustrate common array operations.
This document provides an overview of pointers and dynamic arrays in C++. It discusses pointer variables, memory management, pointer arithmetic, array variables as pointers, functions for manipulating strings like strcpy and strcmp, and advanced pointer notation for multi-dimensional arrays. Code examples are provided to demonstrate concepts like passing pointers to functions, dereferencing pointers, pointer arithmetic on arrays, and using string functions. The overall objective is to introduce pointers and how they enable dynamic memory allocation and manipulation of data structures in C++.
The document discusses arrays in C programming. Some key points include:
- An array is a collection of variables of the same type referred to by a common name. Each element has an index and arrays use contiguous memory locations.
- Arrays are declared with the type, name, and size. The first element is at index 0.
- One-dimensional arrays can be initialized, accessed, input from and output to the user. Multidimensional arrays like 2D arrays represent tables with rows and columns.
- Arrays can be passed to functions by passing the entire array or individual elements. Operations like searching, sorting and merging can be performed on arrays.
The document discusses pointers and arrays in C programming. It explains that an array stores multiple elements of the same type in contiguous memory locations, while a pointer variable stores the address of another variable. The summary demonstrates how to declare and initialize arrays and pointers, access array elements using pointers, pass arrays to functions by reference using pointers, and how pointers and arrays are related but not synonymous concepts.
The document discusses various aspects of arrays in C programming, including:
- Declaring and initializing one-dimensional arrays
- Accessing array elements using pointers and indexes
- Declaring and initializing two-dimensional arrays
- Passing arrays to functions by passing the base address
- Declaring arrays of pointers where each element is a pointer variable
An array is a contiguous block of memory that stores elements of the same data type. Arrays allow storing and accessing related data collectively under a single name. An array is declared with a data type, name, and size. Elements are accessed via indexes that range from 0 to size-1. Common array operations include initialization, accessing elements using loops, input/output, and finding highest/lowest values. Arrays can be single-dimensional or multi-dimensional. Multi-dimensional arrays represent matrices and elements are accessed using multiple indexes. Common array applications include storing student marks, employee salaries, and matrix operations.
The document provides information about arrays, strings, and character handling functions in C language. It discusses:
1. Definitions and properties of arrays, including declaring, initializing, and accessing single and multi-dimensional arrays.
2. Built-in functions for testing and mapping characters from the ctype.h library, including isalnum(), isalpha(), iscntrl(), isdigit(), ispunct(), and isspace().
3. Strings in C being arrays of characters terminated by a null character. It discusses common string handling functions from string.h like strlen(), strrev(), strlwr(), strupr(), strcpy(), strcat(), and strcmp().
The document discusses pointers and their uses. It covers basic pointer operations, how pointers can be used with arrays and characters strings, pointers for 2D arrays, and arrays of pointers. The goal is to help the reader understand pointers, pointers and arrays, pointers and strings, pointers for 2D data, and using arrays of pointers. Examples are provided to demonstrate various pointer concepts.
The document discusses arrays, strings, and pointers in C programming. It defines arrays as sequential collections of variables of the same data type that can be accessed using an index. Strings are stored in character arrays terminated by a null character. Pointers store the address of a variable in memory and can be used to access and modify that variable. Examples are provided of declaring and initializing arrays and strings, as well as using pointer notation to print values and addresses. Common string functions like strlen(), strcpy(), and strcmp() are also explained.
The document discusses arrays in C programming language. It defines arrays as fixed-sized sequenced collections of elements of the same data type that share a common name. One-dimensional arrays represent lists, while two-dimensional arrays represent tables with rows and columns. Arrays must be declared before use with the size specified. Elements can be accessed using indices and initialized. Common operations like input, output, sorting and searching of array elements are demonstrated through examples.
The document discusses arrays in C++. It defines an array as a group of consecutive memory locations with the same name and type. Arrays allow storing multiple values using a single name. The document covers one-dimensional and two-dimensional arrays, including how to declare, initialize, access elements, and write programs to input and output array values. It provides examples of programs that input values into arrays, find the maximum/minimum values, and store/display 2D arrays.
The document provides an overview of pointers in C programming. It defines pointers as variables that contain the address of another variable in memory. The document outlines various pointer operations such as dereferencing with *, address of with &, arithmetic, comparisons, NULL pointers, function pointers, pointers to arrays, arrays of pointers, and pointers to pointers. It provides examples to illustrate how to declare, initialize, and manipulate pointers in C code.
The document discusses pointers in C programming. It defines pointers as variables that store the memory addresses of other variables. It provides examples of declaring pointer variables and using dereference and reference operators. It also covers pointer arithmetic, pointers to pointers, pointers to arrays, pointers as function arguments, pointers to structures including self-referential structures, enumerations, and bitfields. Key concepts are illustrated with code examples and outputs.
The document discusses various aspects of arrays in C programming including defining single and multi-dimensional arrays, initializing array elements, and using arrays to store strings and characters. It explains how to declare and initialize single and two-dimensional numeric and string arrays, access array elements, and demonstrates examples of inputting and sorting data in arrays. The document provides an overview of key concepts for understanding and working with different types of arrays as data structures in C.
The document discusses various aspects of arrays in C programming including defining single and multi-dimensional arrays, initializing array elements, and how to handle arrays. It explains that arrays allow storing multiple values of the same data type and that each element has a unique index. Examples are provided to demonstrate defining, initializing, and accessing elements in single and two-dimensional character and integer arrays.
Two dimensional arrays allow the storage of tables of values arranged in rows and columns. They are declared with the general form type array_name[row_size][column_size]. Elements are accessed using two indices, the first for the row and second for the column. Elements are stored in memory in row-major order, with contiguous blocks for each row. Dynamic allocation of 2D arrays involves allocating an array of pointers, with each pointer storing the address of a dynamically allocated 1D array for that row.
Cyber security refers to every aspect of protecting an organization and its employees and assets against cyber threats. As cyberattacks become more common and sophisticated and corporate networks grow more complex, a variety of cyber security solutions are required to mitigate corporate cyber risk.
C++ very good for us jvkbivucyyfuvivucyxtcubobicyxyvinoucyvibivuvuvuviviibivufucuvubibibuvibibbbibibibhibobkvucycuvibibibibobobobobobobobobobibobkgxyvibibihobibibibibibibibibibibibibibibibivibivuvuvuvuvuvbobobohobkbkbobkkbcccvgvgvgctctctctcrctcrcrcrcrcrvtvtvtctcrcrcrcrcrcrcrcrcrcrcrcrcrcrctvfvfcfvfvtcrcrct rvtctvtvtcrcrcrcrcrcrcrcrcrcrcrcrctctcrcrcrcrcrcrcrcrcrcrcrcrvrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrcrctvtvtvtvtvtvtctvbvvgghhhbbbbbhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhuhhuuuhuuuuuuhuuuuuuuuuuuujtvtvfvtvtvtvtvfvtctvtcctcfctcrcfcfcf f f cccccccccfccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
Applications of artificial Intelligence in Mechanical Engineering.pdfAtif Razi
Historically, mechanical engineering has relied heavily on human expertise and empirical methods to solve complex problems. With the introduction of computer-aided design (CAD) and finite element analysis (FEA), the field took its first steps towards digitization. These tools allowed engineers to simulate and analyze mechanical systems with greater accuracy and efficiency. However, the sheer volume of data generated by modern engineering systems and the increasing complexity of these systems have necessitated more advanced analytical tools, paving the way for AI.
AI offers the capability to process vast amounts of data, identify patterns, and make predictions with a level of speed and accuracy unattainable by traditional methods. This has profound implications for mechanical engineering, enabling more efficient design processes, predictive maintenance strategies, and optimized manufacturing operations. AI-driven tools can learn from historical data, adapt to new information, and continuously improve their performance, making them invaluable in tackling the multifaceted challenges of modern mechanical engineering.
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...IJECEIAES
Medical image analysis has witnessed significant advancements with deep learning techniques. In the domain of brain tumor segmentation, the ability to
precisely delineate tumor boundaries from magnetic resonance imaging (MRI)
scans holds profound implications for diagnosis. This study presents an ensemble convolutional neural network (CNN) with transfer learning, integrating
the state-of-the-art Deeplabv3+ architecture with the ResNet18 backbone. The
model is rigorously trained and evaluated, exhibiting remarkable performance
metrics, including an impressive global accuracy of 99.286%, a high-class accuracy of 82.191%, a mean intersection over union (IoU) of 79.900%, a weighted
IoU of 98.620%, and a Boundary F1 (BF) score of 83.303%. Notably, a detailed comparative analysis with existing methods showcases the superiority of
our proposed model. These findings underscore the model’s competence in precise brain tumor localization, underscoring its potential to revolutionize medical
image analysis and enhance healthcare outcomes. This research paves the way
for future exploration and optimization of advanced CNN models in medical
imaging, emphasizing addressing false positives and resource efficiency.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
Design and optimization of ion propulsion dronebjmsejournal
Electric propulsion technology is widely used in many kinds of vehicles in recent years, and aircrafts are no exception. Technically, UAVs are electrically propelled but tend to produce a significant amount of noise and vibrations. Ion propulsion technology for drones is a potential solution to this problem. Ion propulsion technology is proven to be feasible in the earth’s atmosphere. The study presented in this article shows the design of EHD thrusters and power supply for ion propulsion drones along with performance optimization of high-voltage power supply for endurance in earth’s atmosphere.
Discover the latest insights on Data Driven Maintenance with our comprehensive webinar presentation. Learn about traditional maintenance challenges, the right approach to utilizing data, and the benefits of adopting a Data Driven Maintenance strategy. Explore real-world examples, industry best practices, and innovative solutions like FMECA and the D3M model. This presentation, led by expert Jules Oudmans, is essential for asset owners looking to optimize their maintenance processes and leverage digital technologies for improved efficiency and performance. Download now to stay ahead in the evolving maintenance landscape.
2. No of similar data items grouped together to form a
single entity is called as an Array.
Syntax:
datatype arrayName[subscript]
* Subscript or number of elements in an array.
Eg:
int a,b,c; can be converted as
int a[2]; (i.e) a[0], a[1], a[2]
a[0]
Initialization:
int a[2] = {1,2,3};
index
3. Memory Allocation:
If a[0], a[1], a[2] represent the elements of an array what does array
name represent?
ArrayName holds the base address at which the array starts.
23456
23457
23458
23459
23460
23461
23462
………..
a[0]
a[1]
a[2]
Base address at which the array starts. Array
Name holds this address. So a=23456
The data type
is int, hence
each element
is allocated 2
bytes.
ArrayName applied
with index will
retrieve the value of
the array elements.
4. As the arrayName holds the base address of the array, it acts
as a pointer.
ArrayName is a constant pointer. (i.e) it can always point to
hold the same base address.
Bound checking will not be done for arrays in C. Garbage
value or unknown value will be returned for the Array out of
range retrieval.
Eg:
int a[10], b[10];
a and b holds the base address of their corresponding array.
Below statements are trying to change the base address ‘a’
pointing to. Hence not allowed.
a=b; // illegal.
a++; // illegal.
a = a+2; // illegal.
5. Difference between pointer and an array.
Pointer ArrayName
Pointer value can be changed. (i.e)
Address the pointer holds.
Array Name is a constant pointer.
Can be made to point to any value’s
address.
Points to same base address always.
Sizeof (pointer) will be always same.
(Mostly 2 bytes).
Sizeof (arrayName) varies according to
the datatype.
Sizeof (pointer) will give the size of only
the pointer.
Sizeof (arrayName) gives the size of the
whole array.
6. Pointer arithmetic is applicable to arrays also.
Just as pointer increment or decrement, arrayName
also can be incremented or decremented. Only the
control will be moved. The address to which the
arrayName points to cannot be changed.
Pointer and arrayName are interchangeable.
Pointer –Pointer is applicable to arrays.
If ptr1 and ptr2 are the two pointer variables, then
ptr1-ptr2= (ptr1 – ptr2)
sizeof(data type)
7. Example program where arrayName acts as a pointer.
No value is assigned for element a[2], so zero will be assigned for it.
void main()
{
int i, a[3]={1,2};
clrscr();
printf("Base Address of array:%un", a);
for(i=0;i<=2;i++)
printf("Address of element %d:%u and value :%dn", i, (a+i), *(a+i));
getch();
}
Output:
8. Expression Equivalent Value displayed
arrayName
(Base Address +0)
&(arrayName[0]) Base Address of the array
arrayName + 1
(Base Address +
(1 X sizeof(datatype))
&(arrayName[1]) Address of the second
element of the array
arrayName + 2
(Base Address +
(2 X sizeof(datatype))
&(arrayName[2]) Address of the third
element of the array
Expression Equivalent Value displayed
*arrayName (arrayName[0]) Value of the first element
of the array
*(arrayName + 1) (arrayName[1]) Value of the second
element of the array
*(arrayName + 2) (arrayName[2]) Value of the third element
of the array
9. ArrayName holds the base address of the array, hence it
can be assigned to a pointer and can be used for Array
processing.
Auto increment or decrement can be done in the pointer
variable.
Array name without the brackets is the pointer name
and on the other end, a pointer can be indexed as if its
an array.
int a[10], *b;
b=a // b holds the base address of array ‘a’.
a[1] will give second element of the array.
b[1] will also give 2nd
element of the array.
Here pointer ‘b’ acts as arrayName.
10. Example program to process array using pointer(auto increment):
void main()
{
int iCount; /* Loop Counter */
int iaAr[5]={1,2,3,4,5}; /* Array of 5 integers */
int *piArr=iaAr; /* Pointer to array */
for(iCount=0;iCount<5;iCount++)
{ /* Print the content of array using the pointer */
printf("n%d",*piArr);
piArr++; // This auto increment cannot be done using arrayName
}
}
11. Example program to process array using pointer:
void main()
{
int iCount; /* Loop Counter */
int iaAr[5]={1,2,3,4,5}; /* Array of 5 integers */
int *piArr=iaAr; /* Pointer to array */
for(iCount=0;iCount<5;iCount++)
{ /* Print the content of array using the pointer */
printf("n %d",*(piArr+iCount));
}
}
Output:
12. Example program to process array using pointer:
void main()
{
int iCount; /* Loop Counter */
int iaAr[5]={1,2,3,4,5}; /* Array of 5 integers */
int *piArr=iaAr; /* Pointer to array */
for(iCount=0;iCount<5;iCount++)
{ /* Print the content of array using the pointer */
printf("n %d“, piArr[iCount]); // Indexing using pointer
}
}
Output:
13. Indirection (or) dereference on a pointer will retrieve the value
stored in that address.
A pointer can point to another pointer.
The concept will be same but the application of dereference
operator will vary. As a result many layers of pointer can be
formed and this called multiple indirection.
As such there is no limitation on the level of indirection but
including great depth of indirection is difficult to follow and may
lead to errors. Normally more than 2 level depth indirection is not
required.
A pointer to a pointer has declaration is similar to that of a normal
pointer but have more asterisk sign before them indicating the
depth of the pointer.
Declaration:
int ** pointer;
The above statement creates a pointer which points to pointer to a
variable with int value.
14. int i=10;
10
int *p = &i;
23456
int **ptr = &p;
34567
23456 23457
34567 34568
4456844567
ptr p i
*ptr will retrieve the value
stored in the address of ‘p’. It is
also an address. To retrieve the
value stored in the address ‘p’
is pointing to one more
indirection is applied on *ptr.
**ptr will retrieve the value 10.
Expression Value
ptr 34567
*ptr 23456
**ptr 10
15. Example program for MultipleIndirection:
void main ()
{
int i = 10;
int **p1;
int *p2;
clrscr();
p2 = &i;
p1 = &p2; /* Multiple indirection */
printf (" **p1 = %d And *p2 = %d", **p1,*p2);
getch();
}
Output:
16. Types of arrays:
1-Dimensional array (used in previous slides)
2-Dimensional array
3-Dimensional array and so on
1-D Array:
Consists of many elements. Single row. Multiple columns.
2-D Array:
Consists of many 1-D Arrays. Multiple rows and columns.
3-D Array:
Consists of many 2-D Arrays.
17. Memory Allocation for a 2-D array:
Even though the 2-D array is seen as rows and columns, the memory will
be allocated continuously.
Declaration:
Datatype arrayName[rows][columns];
Rows – No Of 1-D arrays .
Columns – No Of elements in each 1-D Array.
Eg:
int a[10], b[10], c[10];
The above three arrays can be combined together to form a single array.
This forms a 2-D array with rows and columns.
int a[3][10];
Here a[0], a[1], a[2] are three 1-D arrays with 10 elements in each.
Sizeof 2-D Array:
No of elements in 2-D Array = Rows X Columns
Size of 2-D Array = No of elements X sizeof(datatype)
18. Initialization:
int a[3][2]={1,2,3,4,5,6}; // Elements can be given continuously.
int a[3][2]={ {1,2}, // Elements given for each 1- D Array.
{3,4},
{5,6} };
int a[ ][2] = {1,2,3,4,5,6};
No Of Rows = No of Elements / No of columns
10000 10001
10004 10005
10008 10009
1
3
5
10002 10003
10006 10007
10010 10011
2
4
6
a[0]
a[1]
a[2]
2-D Array ‘a’
19. Notes:
Like 1-D Array, 2-D arrayName is also a constant pointer.
In the previous example, 2-D arrayName ‘a’ is a constant
pointer. It holds the base address of 2-D Array.
a[0], a[1], a[2] represent 1-D Arrays. Hence they hold the base
address of each 1-D array correspondingly.
a[0][0], a[0][1], a[1][0], a[1][1], a[2][0], a[2][1] represent the
individual elements. They hold the values.
20. Example that illustrates the 1-d Array in each 2-D array:
void main()
{
int iCount, iColCount; /* Loop Counter */
int iaAr[3][2]={1,2,3,4,5,6}; /* Array of 6 integers */
clrscr();
for( iCount=0;iCount<3;iCount++)
{
for( iColCount=0;iColCount<2;iColCount++)
{
printf("Address of element iaAr[%d][%d]: %un", iCount, iColCount,
&(iaAr [iCount] [iColCount])); /* Address of each element*/
}
}
for( iCount=0; iCount<3; iCount++)
{
printf("Base Address of 1-D Array iaAr[%d]: %u n", iCount, iaAr[iCount]);
}
getch();
}
22. Expression Equivalent Value displayed
arrayName
(or)
*arrayName
(arrayName[0]) Base Address of the 2-D
Array (or) Base Address of
the first 1-D Array
arrayName + 1 (or)
*(arrayName+1)
(arrayName[1]) Base Address of the
second 1-D Array
arrayName + 2 (or)
*(arrayName+2)
(arrayName[2]) Base Address of the third
1-D Array
Expression Equivalent Value displayed
**arrayName (arrayName[0][0]) Value of the first element
of the first 1-D array
**(arrayName + 1) (arrayName[1][0]) Value of the first element
of the second 1-D array
**(arrayName + 2) (arrayName[2][0]) Value of the first element
of the third 1-D array
23. In simple way,
arrayName[row][column]
Each row (1-D Array) can be retrieved using, *(arrayName + rowNumber)
Each element in each row can be retrieved using,
*(*(arrayName + rowNumber)+ columnNumber)
Expression Equivalent Value displayed
*(*arrayName+0)+1) (arrayName[0][1]) Value of the second
element of the first 1-D
array
*(*(arrayName + 1)+1) (arrayName[1][1]) Value of the second
element of the second 1-
D array
*(*(arrayName + 2)+1) (arrayName[2][1]) Value of the second
element of the third 1-D
array
24. Example to display 2-D Array using index:
void main()
{
int iRowCount, iColCount; /* Loop Counter */
int iaAr[3][2]={1,2,3,4,5,6}; /* Array of 6 integers */
clrscr();
for( iRowCount=0;iRowCount<3;iRowCount++)
{
for(iColCount=0;iColCount<2;iColCount++)
{
printf("Value of element iaAr[%d][%d]: %dn", iRowCount, iColCount,
iaAr[ iRowCount][iColCount]);
}
}
getch();
}
28. Notes:
In the same way, 2-D array is processed, 3-D, 4-D etc., arrays can also be
processed.
3-D array is formed by combining multiple 2-D Arrays.
Indirection(*) first applied on the arrayName, will retrieve the 2-D
array’s base address. Second indirection will retrieve the 1-D array’s base
address. Third indirection will retrieve the element value.
Hence according to the dimension, the number of indirection operators
to be applied to retrieve the value will vary.
Eg:
int a[2][3][4];
To retrieve the value of element a[0][1][3] using arrayName as pointer,
*(*(*(a+0)+1)+3) has to be used.
No of Elements = 2X3X4 = 24
Sizeof(a) = 24X2 = 48 bytes