fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct a {
  5. struct b {
  6. int b1;
  7. };
  8. b a1;
  9. int a2;
  10. };
  11. int main() {
  12. a test;
  13. test.a1.b1 = 5;
  14. test.a2 = 6;
  15.  
  16. std::cout<<&test<<" "<<&(test.a1);
  17. // your code goes here
  18. return 0;
  19. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
0x7ffd895f86e0 0x7ffd895f86e0