fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void f(char* s,int n) {}
  5.  
  6. const int N=10;
  7. static char s[N];
  8. static char a[N];
  9.  
  10. int main ()
  11. {
  12. cout << (void*) s << endl;
  13. cout << (void*) a << endl;
  14. cout << (void*) ( a - s ) << endl; //it is reversed, because a is higher now!
  15. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
0x804a0d5
0x804a0df
0xa