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. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
1,3
2,4
3,5