Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

Compiler Design Quiz

Rating
-
Sold
-
Pages
5
Uploaded on
16-09-2024
Written in
2024/2025

Providing 1 word quizzes for Compiler design it also useful for GATE exam

Institution
Course

Content preview

Unit 1: Introduction to Compilers & Lexical Analysis

1. What is the primary function of a compiler?

a) To execute a program

b) To translate a program from source code to object code

c) To edit a program

d) To debug a program



2. Which phase of compilation involves breaking the source code into tokens?

a) Syntax analysis

b) Semantic analysis

c) Lexical analysis

d) Code generation



3. What is the purpose of a lexical analyzer?

a) To parse the syntax of the program

b) To generate intermediate code

c) To identify tokens in the source code

d) To optimize the generated code



4. What is a token in compiler design?

a) A keyword

b) A symbol

c) A sequence of characters with a specific meaning

d) A statement



5. Which of the following is an example of a finite automata?

a) Pushdown automata

b) Turing machine

c) Deterministic finite automata (DFA)

, d) Context-free grammar



6. What is the purpose of regular expressions in compiler design?

a) To define the syntax of a language

b) To specify the semantics of a language

c) To describe patterns in strings

d) To generate code



7. Which phase of compilation involves reporting errors?

a) Lexical analysis

b) Syntax analysis

c) Semantic analysis

d) All of the above



8. What is the input to a compiler?

a) Object code

b) Source code

c) Intermediate code

d) Executable code



9. What is the output of a compiler?

a) Source code

b) Object code

c) Intermediate code

d) Executable code



10. Which of the following is a type of compiler?

a) Interpreter

b) Assembler

Written for

Institution
Course

Document information

Uploaded on
September 16, 2024
Number of pages
5
Written in
2024/2025
Type
OTHER
Person
Unknown

Subjects

$6.09
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
rakeshv

Get to know the seller

Seller avatar
rakeshv Anna University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions