Result of Printf (“%d”, &a)

后端 未结 3 1263
长情又很酷
长情又很酷 2020-12-22 14:17

I have a code in C .

    int a; 
    a =10;
    printf (\"%d\", &a); 

I want to know if some garbage will be printed or error msg will

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-22 14:44

    It will print the address of the variable 'a'. Remember that the & operator returns the address of the operand.

提交回复
热议问题