[ create a new paste ] login | about

Link: http://codepad.org/NfFwLyjD    [ raw code | output | fork ]

C, pasted on Oct 20:
1
2
3
4
5
6
7
8
9
10
11
12
int main()
{
   int x[4] = {1,2,3,5};

   int (*px1)[4] = x ;
   int *px2 = x;
    
   printf("%p %p %p\n", x, px1, px2);
   printf("%d %p %d\n", *x, *px1, *px2);
 
   return 0;
}


Output:
1
2
0xbf4e679c 0xbf4e679c 0xbf4e679c
1 0xbf4e679c 1


Create a new paste based on this one


Comments: