#include #include // note that, in contrast to example4.cpp, here // the arguments of the foo function are pointers. void foo(int * a, int * b) { *a = 10; *b = 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); }