#include #include // Compare to foo in example3.cpp. This version of foo // behaves EXACTLY the same way, it is another way to // do the same thing that the foo function does in example3.cpp void foo(int * a, int * b) { a[0] = 10; b[0] = 20; } int main() { int x = 333; int y = 444; printf("before calling foo:\n"); printf("x = %d, y = %d\n\n", x, y); foo(&x, &y); // note that, in contrast to example4.cpp, the values of x and y // are different after calling the foo function. printf("after calling foo:\n"); printf("x = %d, y = %d\n", x, y); }