+ 3
a variable that holds address of another variable in it is called pointer. Now why it is used It mainly used in data structure. New programmers think how to code. But a program will effective work and say a good program if it has less time complexity and efficient data uses. Pointer holds variable address so, if you want to change data in variable, changing in pointer will effect the variable also. Also sending data to function and function use a call by value it need more data. it will create a another variable of that size which take more memory block in ram. But if you use pointer it will take only address and that size is much less than an another variable of that type. Pointer is much faster than variables.
2nd Dec 2016, 5:32 AM
Aditya kumar pandey
Aditya kumar pandey - avatar