Dynamic memory | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Dynamic memory

The pointer p is stored in the stack as a local variable,and holds the heap's allocated address as itz value. The value of 5 is stored at that address in the heap. here the pointer p holds the allocated address(5) in the stack as its value then they have said that the value of 5 is stored l at that address in the heap so acc to the first sentence i said "5 is the value of the address" n in ma next sentence...they are storing other value in 5 so m cm confused whether 5 is the value or the x value

16th Apr 2017, 7:11 AM
Shreya Parmar
Shreya Parmar - avatar
2 Answers
+ 1
What?
16th Apr 2017, 8:27 AM
Norbivar
Norbivar - avatar
+ 1
contd.... which will store in 5 is the value
16th Apr 2017, 8:33 AM
Shreya Parmar
Shreya Parmar - avatar