Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
For C Programming, pointers is used to pinpoint the address of a particular "cell" or memory. For an example storing value of, let say, 5 in x. The value 5 is not being stored primarily in x, but to the address of x, which cannot be identify from head start because address differs from pc to pc to different times when the application is accessed. Pointers then come into picture. If using secondary main() for an instance, x cannot accessed when it was being store as 5 in the primary main(). But if you use pointers, then the value 5 in x can be access at anytime, anywhere. Hope it is simple enough to be understood.
31st Dec 2016, 9:52 AM
Samuel Chen
Samuel Chen - avatar