Posted By

connordothu on 12/05/09


Tagged


Versions (?)

c pointers


 / Published in: C
 

  1. #include <stdio.h>
  2.  
  3. void funct(char *var)
  4. {
  5. *var = 'd';
  6. printf("%c\n", *var);
  7. }
  8.  
  9. int main()
  10. {
  11. char var = 'c';
  12.  
  13. printf("%c\n", var);
  14. funct(&var);
  15. printf("%c\n", var);
  16. }

Report this snippet  

You need to login to post a comment.