passing_pointers_as_functions.c - #include <stdio.h> void addOne(int ptr*ptr adding 1 to*ptr int main int p i = 10 p =&i addOne(p printf%d*p 11 return 0

passing_pointers_as_functions.c - #include <stdio.h> void...

This preview shows page 1 out of 1 page.

#include <stdio.h> void addOne(int* ptr) { (*ptr)++; // adding 1 to *ptr } int main()
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '12
  • Barrett
  • Return statement, Void type

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture