
SLR5: Stages of Compilation
Authored by Samuel Knott
Computers
12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the first stage of the compilation process?
Syntax Analysis
Lexical Analysis
Code Generation
Code Optimisation
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
During lexical analysis, what is the term used for the smallest unit of meaning in the source code?
Token
Lexeme
Identifier
Keyword
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT considered a valid token in programming languages?
Keyword
Constant
White space
Operator
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a symbol table in the compilation process?
To store the source code
To store tokens and their attributes
To execute the program
To optimise the code
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main task of the syntax analysis stage?
To convert source code into tokens
To check the syntactical structure of the code
To generate machine code
To optimise the code
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an abstract syntax tree?
A tree that represents the syntactical structure of the source code
A table that stores all tokens
A list of all errors in the code
A diagram of the program's flow
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a side effect of lexical analysis?
Removal of syntax errors
Removal of white space and comments
Generation of machine code
Creation of an abstract syntax tree
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?