It is rather a matter of theory, and then any actual code. I understand that if you declare an int i variable; then it allocates 4 bytes in memory for the integer i. I understand if you use malloc to create your memory.
I am curious how memory is processed when you do something like
int x;
int y;
double z;
z = (float)x/(float)y;
When you perform a similar action, how memory is processed. Does the program create a float and save x and y and then do the splitting? Or is it something out of memory?
Thanks for any explanation!
source
share