Skip to content
Related Articles

Related Articles

GATE | GATE-CS-2005 | Question 61

Improve Article
Save Article
  • Last Updated : 01 Sep, 2021
Improve Article
Save Article

Consider line number 3 of the following C- program.

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.

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!