
Keyword Recognition and Symbol Table Quiz
Authored by M. R.
Computers
1st Grade - University

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main purpose of a symbol table in a compiler?
To generate intermediate code
To store the source code
To perform keyword recognition
To associate identifiers with their attributes
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a method for efficient keyword recognition?
Storing keywords in length order
Using a perfect hashing function
Using a linear search on all keywords
Using a binary search on an alphabetically ordered table
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a characteristic of a perfect hashing function?
It results in a unique value for each keyword
It is complex and time-consuming to compute
It requires a large amount of memory
It allows for multiple entries for the same keyword
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure is simplest to implement for a symbol table?
Hash table
Binary search tree
Linear list
AVL tree
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when a new name is added to a linear list symbol table?
It is added at the beginning of the list
It is added at the end of the list
It replaces the first entry
It is added randomly
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a hash table, what does the hash function do?
It checks for duplicate entries
It sorts the entries alphabetically
It maps strings to integer values
It deletes entries from the table
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main drawback of using a linear list for a symbol table?
It cannot handle dynamic entries
It requires a lot of memory
It has poor performance with large n and e
It is difficult to implement
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?