+ 2

But *ptr stores the actual value of the varible x right? Then why is it written *ptr=&x when it does not store its address.

23rd Oct 2019, 4:34 PM
shreya
shreya - avatar
3 Respostas
+ 1
Its address will be stored in ptr only right?
23rd Oct 2019, 4:35 PM
shreya
shreya - avatar
+ 1
*ptr is a pointer that stores the memory location of a variable. It does not store the actual value but the address where actual value is placed...
23rd Oct 2019, 4:46 PM
Abhishek Kumar Singh
Abhishek Kumar Singh - avatar
+ 1
Thankyou so much:)
23rd Oct 2019, 5:32 PM
shreya
shreya - avatar