why we use pointer im the programme | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why we use pointer im the programme

19th Aug 2016, 8:33 AM
Anuj Mishra
Anuj Mishra - avatar
4 Answers
+ 3
Pointers are used for a lot of things. The most common use is for "Dynamic Memory Allocation" which cannot be performed without the use of pointers. Some other use cases are to pass a function as a parameter to another function or efficient handling of large amounts of data as you can use pointers to pass a large struct/class to a function without copying the entire struct/class.
19th Aug 2016, 10:29 AM
0xfz13
+ 1
Pointers allow dynamic memory management. This means you can access memory more efficiently and with less usage of your memory. The memory managed by pointers is only reserved dynamically when necessary.
19th Aug 2016, 10:15 AM
Tensa
Tensa - avatar
0
Sorry can i get your question again?
19th Aug 2016, 9:01 AM
Wallace Scott
0
what is the use of pointer
19th Aug 2016, 9:10 AM
Anuj Mishra
Anuj Mishra - avatar