Question 8270 – Engineering-Mathematics
May 22, 2024Subnetting
May 22, 2024Compiler-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?
|
Syntax analyzer
|
|
|
Lexical analyzer
|
|
|
Semantic analyzer
|
|
|
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.
