A pointer is a derived data type in C.It is built from one of the fundamental data types available in C.Pointer contain memory addresses as their values.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.
pointer are undoubtedly one of the most distinct and exciting features of C language.It has added power and flexibility to the language.Although they appear little confusing and difficult to understand for a beginner,they are a powerful tool and handy to use once they are mastered.
Pointers are used frequently in C,as they offer a number of benefits to the programmers.
They include:
1.pointer are more efficient in handling arrays and data tables.
2.Pointer can be used to return multiple values from a function via function arguments.
3.pointers permit reference to functions and thereby facilitating passing of functions as arguments to other functions.
4.The use of pointer arrays to character string results in saving of data storage space in memory.
5.pointers allow C to support dynamic memory management.
6.pointers provide an efficient tool for manipulating dynamic data structures such as structures,linked lists,queues,stacks and trees.
7.pointers reduces length and complexity of programs.
8.They increase the execution speed and thus reduce the program execution time.of course,the real power of C lies in the proper use of pointers.
No comments:
Post a Comment