0
Pointer
I read somewhere that : int c, *ptr; *ptr = &c; // is wrong, coz *ptr is the value pointed by address whereas &c is an address. But there are many tutorials out there which uses that. why is that?
1 Resposta
+ 1
Correct is ptr=&c;
*ptr is the value at the address
when you assign an address (&c) you assign it to ptr directly