Question Paper : IITM Online Foundation Qualifier Q1QP2 22 Nov 2020
CT - Q53
For the given answers, Why isn't '2. Error in Line 5' included as well?
As the question clearly mentions, the following program is for a variable A and not for the variable C as mentioned in the starting lines of the question. Only the logic applied for incrementing a variable is correct but as the question asks it is required to find the errors for the given program segment and seeing how using a non-specified variable, i.e variable mentioned in question being A and in written code C, would count as an error (as it does for Line 1), option 2 should also qualify as a correct choice. Hence, the answers should have been 1, 2 and 4.
Can someone from the faculty kindly look into it?
Would be of great help if can clarified.