fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a = 6, b = 7, &foo = a, *bar = &a;
  6. cout << foo << endl;
  7. cout << bar << endl;
  8. foo = 7;
  9. bar = &b;
  10. cout << a << ":" << foo << endl;
  11. cout << bar << ":" << *bar << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
6
0xbfcc5268
7:7
0xbfcc526c:7