Keyword Recognition and Symbol Table Quiz

Keyword Recognition and Symbol Table Quiz

1st Grade - University

16 Qs

quiz-placeholder

Similar activities

1.3.1. Compression, Encryption and Hashing

1.3.1. Compression, Encryption and Hashing

12th Grade

13 Qs

Episode 16

Episode 16

University

18 Qs

GCSE Computing: Computational Logic 2.4

GCSE Computing: Computational Logic 2.4

11th - 12th Grade

15 Qs

sql queries - 2

sql queries - 2

12th Grade

20 Qs

MICROSOFT EXCEL 2016

MICROSOFT EXCEL 2016

6th Grade

20 Qs

Java HashMap Quiz

Java HashMap Quiz

11th Grade

14 Qs

Java Basic Data Structures

Java Basic Data Structures

6th - 10th Grade

15 Qs

Databases

Databases

10th - 11th Grade

14 Qs

Keyword Recognition and Symbol Table Quiz

Keyword Recognition and Symbol Table Quiz

Assessment

Quiz

Computers

1st Grade - University

Hard

Created by

M. R.

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?