- #1
spursfan2110
- 21
- 0
Hey, so I am teaching myself the C language to get a head start for a class I have to take later and am a little bit confused about something. I understand that if you call a function from within your int main, the variables you pass are actually copies of the originals and when the program returns to intmain, they will retain the last values they before the outside function was called, provided what you passed was not a pointer to an array, correct? So is there a way to edit the values of variables inside of external functions and have them retain that edited value when they return to int main, other than returning a value and saving that?
I hope this was clear, thanks for the help!
I hope this was clear, thanks for the help!