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