Size of Pointer: Primitive Variables store different types of data which are of different sizes. We can find the size of type using sizeof() function. Pointer variable holds an address. Address is of integer type. …
Swapping using Call by Reference: While calling a function if we pass address of actual parameters as arguments to the formal parameters in the calling function known as call by reference. In call by reference …
Call by Value: Calling the function by passing value as parameter. We collect the value into an argument of function. Arguments are working like local variables. Processed arguments can access only from same function. Swapping …
Pointer: It is a derived data type. Pointer variable holds address of memory block. We can process the data directly using pointers(holding addresses) Syntax: datatype* identity; (or) datatype *identity; Types of pointers: Typed: …
Nested structures: Defining a structure inside another structure. We access the elements of nested structure using outer structure reference variable. Note: to access the elements of a structure that is a part of another structure, …
Arrays in structure: We can store an array inside the structure as structure element. To access elements of that array, we use loops.
Array of Structures: Using structure variable we can store only one record. To store multiple records, we need to declare Array variable of structure type. We use loop to process elements of these records.
Function returning structure: A function can return the structure type. We need to specify the structure type as return type. It returns the base address of structure memory block. We collect the returned address into …
Passing structure as a parameter: We have seen the programs in which passing primitive types(int, float….) and derived types(arrays and strings). We can also pass, structure as a parameter. When we pass the structure, only …
Local structure: Define structure inside the function. It can be accessed only from the same function in which it has defined. Global structure: Define structure outside to all functions. Global structure can be accessed through …