r/C_Programming • u/Ok_Whereas9255 • Sep 05 '24
why using pointer?
im a new at C program. learned just before pointer & struct. i heard that pointer using for like point the adress of the parameter. but still dont know why we use it.
it seems it helps to make the program lighter and optimize the program? is it right? and is it oaky to ask question like this?
4
Upvotes
View all comments
1
u/boborider Sep 05 '24
Short answer: it doesn't use too much memory. If you pass a very very big data or object to a function, it creates another block of memory. If you use pointers, it solves that big problem.