...
Question 8270 – Engineering-Mathematics
May 22, 2024
Subnetting
May 22, 2024
Question 8270 – Engineering-Mathematics
May 22, 2024
Subnetting
May 22, 2024

Compiler-Design

Question 4
Consider the following ANSI C program:

int main()  {

      Integer x;

      return 0;

}

Which one of the following phases in a seven-phase C compiler will throw an error?

A
Syntax analyzer
B
Lexical analyzer
C
Semantic analyzer
D
Machine dependent optimizer
Question 4 Explanation: 
Integer will be considered as a variable and hence it will be treated as an undeclared identifier and so it is a semantic error.
Correct Answer: C
Question 4 Explanation: 
Integer will be considered as a variable and hence it will be treated as an undeclared identifier and so it is a semantic error.

Leave a Reply

Your email address will not be published. Required fields are marked *