Consider the code segment written below in C++: if (count < 10) // if #1 if…
KVS TGT/PGT 2018Kendriya Vidyalaya Sangathan 2018
Consider the code segment written below in C++: if (count < 10) // if #1 if ((count % 4) == 2) // if #2 cout << "condition; white\n"; else // (Indentation is wrong) cout << "condition is: tan\n"; There are 2 if statements and one else. To which if, the else statement belong?
- A.
It belongs to if #1
- B.
It belongs to if #2
- C.
It belongs to both the if statements
- D.
It is independent
Attempted by 487 students.
Sign up free to check your answer
Sign up freeLoading lesson…

