Printing a pointers value

前端 未结 5 2086
囚心锁ツ
囚心锁ツ 2021-01-14 21:25
#include 

int main(void)
{
   int x = 99;
   int *pt1;

   pt1 = &x;

   printf(\"Value at p1: %d\\n\", *pt1);
   printf(\"Address of p1 (with %%         


        
5条回答
  •  花落未央
    2021-01-14 21:52

    %d displays an integer - there is no need for the size of a pointer to equal the size of an integer.

提交回复
热议问题