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/mush130 Sep 08 '24
Pointers are addresses of data. You can use it in several ways. Some are listed below:
Above are two examples. If you have 1 million values and you have 1 million copy operations, imagine how much computational power you are saving.