Fundamental Programming Errors & Exceptions Beginner
Q In C++, what happens when int a[5]; a[7] = 3; is executed?
  • A The array automatically grows
  • B Compilation error
  • C std::out_of_range is thrown
  • D Undefined behavior; there is no compile-time or runtime bounds check
Leave a Comment