CSCE 3600 - FINAL EXAM REVIEW
Optimization of a program that works within a single basic block of code is called -
Answers - local transformation / optimization
Any macros specified in source code are expanded by the. - Answers - preprocessor
What is the role of optimizing the compiler? - Answers - (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? - Answers - (B) Source code
(C ) Machine code
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 - Answers - (C) Both A and B
Which of the following is not a Python reserved word? - Answers - (A) spam
Which of the following elements of a mathematical expression in Python is evaluated
first? - Answers - (A) Parenthesis ( )
These operations are performed in parsing phase of compilation. - Answers - (A)
Obtaining tokens from lexical analysis
(B) Group tokens into statements
(C) Construct parse trees
The primary job of the linker is to. - Answers - (A) combine functions, libraries, etc., into
an executable program
In a C program, the statement int x = 10.5; should be detected as______ - Answers -
(C) Semantic error
Which gcc compiler optimization flag optimizes the generated code for both size and
speed? - Answers - (A) -O3
Optimization of a program that works within a single basic block of code is called -
Answers - local transformation / optimization
Any macros specified in source code are expanded by the. - Answers - preprocessor
What is the role of optimizing the compiler? - Answers - (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? - Answers - (B) Source code
(C ) Machine code
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 - Answers - (C) Both A and B
Which of the following is not a Python reserved word? - Answers - (A) spam
Which of the following elements of a mathematical expression in Python is evaluated
first? - Answers - (A) Parenthesis ( )
These operations are performed in parsing phase of compilation. - Answers - (A)
Obtaining tokens from lexical analysis
(B) Group tokens into statements
(C) Construct parse trees
The primary job of the linker is to. - Answers - (A) combine functions, libraries, etc., into
an executable program
In a C program, the statement int x = 10.5; should be detected as______ - Answers -
(C) Semantic error
Which gcc compiler optimization flag optimizes the generated code for both size and
speed? - Answers - (A) -O3