Advertisement
luizaspan

Aula ponteiros V

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