Advertisement
fellpz

*Ponteiro II

Apr 5th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. int main ()
  3. {
  4. int num,*p;
  5. num=55;
  6. p = &num; /* Pega o endereco de num | Liguei pra firma e pedi o endereço*/
  7. printf ("\nValor inicial: %d\n", num);
  8. *p=100; /* Muda o valor de num de uma maneira indireta */
  9. printf ("\nValor final: %d\n", num);
  10. return(0);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement