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