Home > Back-end > C language pointer is a pointer to the variable address this sentence right?
C language pointer is a pointer to the variable address this sentence right?
Time:09-19
, how do you do, in fact the title of this sentence I know is right, but I now suddenly by blocking is thinking at the time of writing the program below I found if I direct output to pointer of the output value is not a pointer to the variable's address, I don't know why, bother you give me solution, appreciate
# include Int main () { int a; Int * pa=& amp; a; Printf (" please enter a number \ n "); The scanf (" % d ", pa); Printf (" the name of the pointer address: % p \ n ", & amp; Pa); Printf (" the name of the pointer value: % lx \ n ", & amp; Pa); Printf (" pointer address: % p \ n ", * pa); Printf (" the value of the pointer: % d \ n ", * pa); Printf (" variable address: % p \ n ", a); Printf (" the value of a variable: % d ", a); return 0; }
CodePudding user response:
& Is pick up address, * is taking the address in the value of the Pa is a pointer, so & amp; Pa is the secondary pointer, rather than the pa,