size of pointer in c

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. …

Call by Reference in C

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 in C

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 …

Pointers in C

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 in C

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 Structures Code in C

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 in C

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.

C Function return structure

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 …

C structure as parameter

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 …

C Local and Global structures

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 …

Courses Enquiry Form