Data Types Arrays & Memory Layout Beginner
Q Is int n; cin >> n; int a[n]; standard C++?
  • A Only when n is less than 100
  • B Yes, since C++11
  • C Yes, always
  • D No; variable-length arrays are not part of standard C++ (some compilers accept them as an extension)
Leave a Comment