Lexical Analysis Quiz

Lexical Analysis Quiz

Assessment

Passage

Information Technology (IT)

5th Grade

Medium

Created by

Kituku Ben

Used 1+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the process of reading characters from a source program called?

Semantic analysis

Lexical analysis

Syntax analysis

Code generation

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are tokens in programming languages?

Sequences of characters with meaning

Errors in code

Variable names only

Comments in code

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a type of token?

Punctuation

Comments

Operators

Constants

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a lexical analyzer produce as output?

Machine code

Stream of tokens

Error messages

Source code

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a lexeme?

A type of token

A type of error

A sequence of characters forming a token

A programming language

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the scanner NOT check for?

Malformed entities

Unrecognized symbols

Garbled sequences

Valid tokens

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'loop and switch' implementation?

To optimize code

To generate machine code

To read characters and process them

To create a graphical interface

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?