I am learning about structures in C. when we pass a structure as an argument to another function, what exactly are we doing? are we copying all the member values in another function? When we pass an array as argument, we are passing the first address of the array – array[0]. things don’t seem so simple with structure. My guess is that we are neither copying any value nor passing any address. we are telling compiler to be ready to use, as and when required, the addresses of the members of the structure being passed. I am not sure though.. any help is appreciated.
Share
This should answer your question if you compile it and run it.