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. | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 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 Réponses
+ 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