fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.  
  7. int vetor [4] = {1,2,3,4 };
  8. int i;
  9. int *pt = vetor;
  10.  
  11. for(i = 0; i < 4; i++)
  12. {
  13.  
  14.  
  15.  
  16. printf("\nLocal: %p, Valor: %d\n", pt, *pt);
  17. pt++;
  18. }
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
Local: 0x7ffd1b0d42c0, Valor: 1

Local: 0x7ffd1b0d42c4, Valor: 2

Local: 0x7ffd1b0d42c8, Valor: 3

Local: 0x7ffd1b0d42cc, Valor: 4