GATE | GATE-CS-2005 | Question 61
Consider line number 3 of the following C- program.
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.
int main ( ) { /* Line 1 */ int I, N; /* Line 2 */ fro (I = 0, I < N, I++); /* Line 3 */} |
Identify the compiler’s response about this line while creating the object-module
(A) No compilation error
(B) Only a lexical error
(C) Only syntactic errors
(D) Both lexical and syntactic errors
Answer: (C)
Explanation: Note that there is ‘fro’ instead of ‘for’. This is not a lexical error as lexical analysis typically involves Tokenization.



