+ 2
Why this code giving me warning in sololearn compiler ( not blaming ) but not in pc ?
7 odpowiedzi
+ 1
Integer can hold only 4bytes data. But address returned is int* is 8bytes . You loss data by integer converting.
Instead convert to a long type value to see in decimal value.. like
printf("address of p is %ld", (long) p) ;
Hope it clears..
+ 3
Use %p specifier for accesing in all addresses instead of %d.
Address returned is of int* type.
you it need to use compatible types...
+ 2
use "p" not "d" for printing addresses eg
printf("address of a = %p\n", &a);
+ 1
Jayakrishna🇮🇳 but sir what if i want to see my address in integer form for simplicity ?
+ 1
Ok Jayakrishna🇮🇳 sir thanks
0
You're welcome..