fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a[3] = {1,2,3};
  5.  
  6. for(int i=0; i<3; i++){
  7. printf("&a[%d]:%p \n", i, &a[i]);
  8. printf("a+%d :%p \n", i, a+i);
  9. }
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
&a[0]:0x7ffcb16851cc 
a+0  :0x7ffcb16851cc 
&a[1]:0x7ffcb16851d0 
a+1  :0x7ffcb16851d0 
&a[2]:0x7ffcb16851d4 
a+2  :0x7ffcb16851d4