QUESTIONS AND ANSWERS 100%
CORRECT
Optimization of a program that works within a single basic block of code is called -
ANSWER-local transformation / optimization
Any macros specified in source code are expanded by the. - ANSWER-preprocessor
What is the role of optimizing the compiler? - ANSWER-(A) To take less time for
execution
(B)To occupy less space (memory)
(C)To optimize the code
What does the lexical analyzer take as input? - ANSWER-(B) Source code
(C ) Machine code
These operations are performed in parsing phase of compilation. - ANSWER-(A)
Obtaining tokens from lexical analysis
(B) Group tokens into statements
(C) Construct parse trees
The primary job of the linker is to. - ANSWER-(A) combine functions, libraries, etc., into
an executable program
In a C program, the statement int x = 10.5; should be detected as______ - ANSWER-
(C) Semantic error
Which gcc compiler optimization flag optimizes the generated code for both size and
speed? - ANSWER-(A) -O3
What will be the output of the following Python code segment?
a = int(input("Enter an integer: "))
b = int(input("Enter an integer: "))
if a <= 0:
b = b +1
else:
a = a + 1 - ANSWER-(C) Both A and B
Which of the following is not a Python reserved word? - ANSWER-(A) spam