0

What is pointer & why it is used?

I'm learning about pointers.so pls tell about it and with a coding and which places it can used in coding. what type of problems it can rectify

18th Nov 2016, 4:11 PM
Bharath
1 Réponse
+ 3
a variable that holds address of other 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 data 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.
18th Nov 2016, 4:34 PM
Aditya kumar pandey
Aditya kumar pandey - avatar