wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Compiler

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Assembler is used as a translator for?

a)

Low level language

b)

High Level Language

c)

COBOL

d)

C

2.

Which of the following is true about interpreters?

a)

They translate the entire program at once

b)

They generate an intermediate code before execution

c)

They are faster than compilers

d)

They execute the program line by line

3.

What is the role of a loader in the execution of a program?

a)

Allocate memory to the program

b)

Translate assembly code to machine code

c)

Optimize the program for better performance

d)

Convert high-level language code to low-level code

4.

Which of the following are Lexemes?

a)

Identifiers

b)

Constants

c)

Keywords

d)

All of the mentioned

5.

Which phase of the compiler is responsible for syntax analysis?

a)

Lexical Analysis

b)

Semantic Analysis

c)

Syntax Analysis

d)

Code Generation

6.

What is the purpose of a symbol table in compiler design?

a)

Store information about the source code

b)

Translate high-level code to low-level code

c)

Optimize the program for memory usage

d)

Execute the program line by line

7.

Does the compiler program translate the whole source code in one step?

a)
  1. No

b)
  1. Depends on the Compiler

c)
  1. Don't Know

d)
  1. Yes

8.

Which of the following file is an output of the assembler?

a)
  1. Program file

b)
  1. Object file

c)
  1. Data File

d)
  1. Task File

9.

What is the linker?

a)
  1. It is always used before the program execution.

b)
  1. It is required to create the load module.

c)
  1. It is the same as the loader

d)
  1. None of the above

10.

Which computer program accepts the high-level language and converts it into assembly language?

a)
  1. Interpreter

b)
  1. Linker

c)
  1. Assembler

d)
  1. Compiler