#include <stdio.h> int main(void) { int a[3] = {1,2,3}; for(int i=0; i<3; i++){ printf("&a[%d]:%p \n", i, &a[i]); printf("a+%d :%p \n", i, a+i); } return 0;}
Standard input is empty
&a[0]:0x7ffcb16851cc a+0 :0x7ffcb16851cc &a[1]:0x7ffcb16851d0 a+1 :0x7ffcb16851d0 &a[2]:0x7ffcb16851d4 a+2 :0x7ffcb16851d4
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!