Important MCQ

Output? (same code, y = 1900) int y = 1900; if (y % 400 == 0) cout << "Leap"; else if (y % 100 == 0) cout << "Not"; else if (y % 4 == 0) cout << "Leap"; else cout << "Not";

Q.Output? (same code, y = 1900) int y = 1900; if (y % 400 == 0) cout << "Leap"; else if (y % 100 == 0) cout << "Not"; else if (y % 4 == 0) cout << "Leap"; else cout << "Not";

A) Leap
B) Not
C) LeapNot
D) Error
Correct Answer:
Option B
Detailed Explanation:
1900 % 400 != 0 but 1900 % 100 == 0 -> Not.