1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream> int main() { int x = 3; int y = 2; std::cout << "x = " << x << ", y = " << y << std::endl; int *p; p = &x; *p = *p + y; std::cout << "x = " << x << ", y = " << y << std::endl; return 0; } /* end */
1 2
x = 3, y = 2 x = 5, y = 2