Home » Compiler Design » Compiler design miscellaneous » Question

Compiler design miscellaneous

  1. Consider line number 3 of the following C program :

    Identify the compiler’s response about this line while creating the object-module.
    1. No compilation error
    2. Only a lexical error
    3. Only syntactic errors
    4. Both lexical and syntactic errol
Correct Option: C

There are no lexical errors for C because all the wrong spelled keywords would be considered as identifiers until the syntax is checked. So the compiler would give syntax errors.



Your comments will be displayed only after manual approval.