fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. char a[2]={'a','b'};
  6. char b[3]="ab";
  7. cout<<&a<<endl;
  8. cout<<&b<<endl;
  9. cout<<sizeof(a)<<endl<<sizeof(b);//the result of this I am puzzled
  10. return 0;
  11. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
0xbfdb397b
0xbfdb397d
2
3