Advertisement
pauloludewig

funcao com ponteiro

May 2nd, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void funcao(int *p)
  5. {
  6. *p=*p+5;
  7. }
  8.  
  9. int main(void)
  10. {
  11. int a=3;
  12. funcao(&a);
  13. printf("%d\n", a);
  14. system("PAUSE");
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement