Does the following code contain errors?

void Test() {
  try {
    int i = 10, j = 20;  // 1
    throw int(10);  // 2
  }
  catch (...) {  // 3
    i = 20;  // 4
    int j = 20;  // 5
  }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C++ quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes