Search Header Logo

Compiler Unit 1 Quiz

Authored by PRIYA PRIYA

Computers

12th Grade

Used 1+ times

Compiler Unit 1 Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main function of a compiler?

To translate source code into target code

To execute programs line by line

To optimize machine code

To manage memory allocation

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a type of translator?

Interpreter

Compiler

Debugger

Assembler

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the lexical analysis phase produce?

Object code

Syntax tree

Tokens

Intermediate code

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which phase of the compiler checks for semantic errors?

Lexical analysis

Syntax analysis

Code generation

Semantic analysis

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of code optimization?

To create a symbol table

To check for syntax errors

To reduce redundant code

To generate machine code

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which tool is used to generate syntax analyzers?

Code Generators

Scanner Generator

Parser Generators

Data-Flow Engines

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does an assembler do?

Optimizes intermediate code

Generates syntax trees

Translates assembly language to machine code

Translates high-level language to machine code

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?

Discover more resources for Computers