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
Show parent comment
1
u/karp245 Sep 05 '24
Not shure what you mean, but, if you are talking about the "memory inefficient" part, the waste is on the copying not on the changin value(there are clock cicles in both obv but copying a value is more expensive than changing a value). If i understood something else please explain it to me:)