[ create a new paste ] login | about

Link: http://codepad.org/O7k9i7LY    [ raw code | output | fork ]

C++, pasted on May 24:
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 */


Output:
1
2
x = 3, y = 2
x = 5, y = 2


Create a new paste based on this one


Comments: