#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] : 0x7ffd3e54ca0c a+0 : 0x7ffd3e54ca0c &a[1] : 0x7ffd3e54ca10 a+1 : 0x7ffd3e54ca10 &a[2] : 0x7ffd3e54ca14 a+2 : 0x7ffd3e54ca14
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!