What is Pointer explain and What are the benefits of Pointer
Pointer
A pointer is a derived data type in C. it is built from one of the fundamental data types available in C.
A pointer variable is a variable that contains an address which is the location of another variable in memory.
Since these memory addresses are the locations in the computer memory where program instructions and data are stored, pointers can be used to access and manipulate data stored in the memory.
Benefits of using pointers :
Pointers are more efficient in handling arrays and data tables.
Pointers can be used to return multiple values from a function via function arguments.
Pointers permit references to functions and thereby facilitating passing of function as arguments to other functions.
The use of pointer arrays to character strings results in saving of data storage space in memory.
Pointers allow C to support dynamic memory management.
Pointers provide an efficient tool for manipulating dynamic data structures such as linked list, queues, stacks and trees.
Pointers reduce length and complexity of programs.
They increase the execution speed and thus reduces the program execution time.