I do not understand the concept Memory Snapshot Can someone


I do not understand the concept \"Memory Snapshot\", Can someone please explain it? or give some examples to do it

1. Trace (show a \"memory snapshot\") the following statements by hand int f 4, g 2, h; double r 2.5, q;

Solution

Answer:

Memory snapshot means here that as in this piece of code there are alot of variables : f , g , h and r . Each variable is a kind of memory here. First f = 4 and g = 2 is initialized with the values , we represent these variables as boxes which contains 4 and 2 , then r = 2.5 is initialized. Similarly at the each line of the code , the variable memory is been updated according to the opperations performerd like h = f + r /2 , q = h%g*2 , r = f - (g-7)*q -h like this each variable is been updated with the corresponding values.

 I do not understand the concept \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site