Advertisement
luizaspan

Aula ponteiros IV

Jun 16th, 2015
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5.     int i, data[4]={1,7,4},*p=&data[0];
  6.  
  7.     for (i=0;i<4;i++)
  8.     printf("Valor %d em %p \n",*(p+i),p+i); // *(p+i) endereço apontado por p+i
  9.  
  10.  return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement