why do i get the same value of the address?

后端 未结 4 1744
无人共我
无人共我 2020-12-11 07:13
#include
#include

void vaibhav()
{
    int a;
    printf(\"%u\\n\",&a);
}

int main()
{
    vaibhav();
    vaibhav();
    vaibhav(         


        
4条回答
  •  粉色の甜心
    2020-12-11 07:35

    It is not necessary. You may or may not get the same value of the address. And use %p instead.

     printf("%p\n", (void *)&a);
    

提交回复
热议问题