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