Lexical Analysis Quiz

Lexical Analysis Quiz

Assessment

Passage

Information Technology (IT)

5th Grade

Practice Problem

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?