fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. using S = char[3];
  5. using S2 = S[2];
  6.  
  7. struct X {
  8. char a;
  9. char b;
  10. char c;
  11. };
  12.  
  13. int main() {
  14. S2 x = {{'a','b',0},{'c','d',0}};
  15. S *px = x;
  16. S2 *p2 = &x;
  17. std::cout << x[0] << p2[0][1] << (2*sizeof (X));
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5392KB
stdin
Standard input is empty
stdout
abcd6