Pointer - C Programming
- variables that hold address of another variable of same data type
- Pointers are more efficient in handling Array and Structure.
- Pointer allows references to function and thereby helps in passing of function as arguments to other function.
- It reduces length and the program execution time.
- It allows C to support dynamic memory management.
p = arr;
or p = &arr[0]; //both the statements are equivalent.
- Pointer variables of char type are treated as string.
- char *str = "Hello";
- Pointer in function parameter list is used to hold address of argument passed during function call. This is also known as call by reference. When a function is called by reference any change made to the reference variable will effect the original variable.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment