Where do temporary data be put?

cout << 5;//the 5
cout << "hello";// the hello
int x = 5;//the "5" 

these data occupy memory too? Where do they be put?
and how long is the life period?
Last edited on
Hello ccdare , I am not sure but i will try to help out. (if i got anything wrong please correct me anyone ). I think that all the variables such as int x=5; that you mentioned is stored in the ram . They also have a unique adress in the ram and you can access them . Their lifetime is untill the program is terminated.
Topic archived. No new replies allowed.