0
Y iam not getting address of the variable in printf("\n%u",a); where a is declared as int ..
6 Respostas
+ 1
Use &a
+ 1
Using %u to print addresses is undefined behavior.
You must use %p specifier for addresses and cast to a void pointer (this is required by C99):
printf("%p\n", (void *)&a);
you can read more about it here:
https://stackoverflow.com/questions/9053658/correct-format-specifier-to-print-pointer-or-address
0
Then I will get the value of a..
0
a returns value..
&a returns address..
printf("%u", &a) ;
0
Ooops..a u r right..thanks to remember me I forget that
0
S ..thanks mr.Avinesh and to mr.JayaKrishna