GATE | GATE-CS-2005 | Question 61
Consider line number 3 of the following C- program.
Identify the compiler\’s response about this line while creating the object-module
No compilation error
Only a lexical error
Only syntactic errors
Both lexical and syntactic errors
Lexical errors refer to errors related to the lexemes or tokens in the program, such as misspelled keywords or identifiers that are not recognized by the language. Here, “fro” instead of “for”.
Syntactic errors occur when the code violates the grammar or syntax rules of the programming language. Here, inside for loop there is coma instead of semicolomn
Quiz of this Question
Please comment below if you find anything wrong in the above post
Please Login to comment...