0% found this document useful (1 vote)
8K views

Compiler Design Assignment-Week 0 12 Total Mark: 12 X 1 12

This document contains a 12 question multiple choice quiz about compiler design. The questions cover topics such as the task of a compiler, natural language constructs, parts of a computer system, data structures for search and insertion/deletion, tasks of an interpreter, limitations of finite automata, and more. The quiz tests fundamental concepts in compiler design and computer science.

Uploaded by

dheena thayalan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
8K views

Compiler Design Assignment-Week 0 12 Total Mark: 12 X 1 12

This document contains a 12 question multiple choice quiz about compiler design. The questions cover topics such as the task of a compiler, natural language constructs, parts of a computer system, data structures for search and insertion/deletion, tasks of an interpreter, limitations of finite automata, and more. The quiz tests fundamental concepts in compiler design and computer science.

Uploaded by

dheena thayalan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

NPTEL Online Certification Courses

Indian Institute of Technology Kharagpur

Compiler Design
Assignment- Week 0
TYPE OF QUESTION:MCQ
Number ofquestions:12 Total mark: 12 X 1 = 12

 
 
 
Q1.

Task of a compiler is to-

a) Translate one statement at a time and execute it

b) Translate the whole program to machine language

c) Translate one statement of the program at a time

d) None of the other options


ANS : b) Translate the whole program to machine language

Q2.
In a computer system, number of compilers for a particular programming language may be
a) Two

b) Three

c) Four

d) Many

ANS: d) Many
Q3.
Natural language constructs are

a) Ambiguous

b) Unambiguous

c) May be Unambiguous or ambiguous

d) None of the other options

ANS: c) May be Unambiguous or ambiguous

Q4.
A compiler is defined as
a) Part of system software

b) Part of operating system

c) Part of machine code

d) None of the other options

ANS: a) Part of system software


Q5.

Suppose there is a compiler for C language that can generate code for Computer A. Which
of the following statements is true

a) It can be used for Computer A only

b) It can be used for any computer

c) It can be used only for computers with similar processor and operating system

d) It can be used only for computers with similar processor, operating system and
peripherals

ANS: c) It can be used only for computers with similar processor and operating system

Q6.

Which of the following data structures may be good if there are frequent search for data
items followed by insertion and deletion?

a) Array

b) Link List

c) Tree

d) Hash Table

ANS: d) Hash Table


Q7.

In a computer system number of compilers may be


a) One
b) Many
c) Two
d) Ten
ANS: b) many

Q8.
Task of an interpreter is to
a) Translate one statement of the program at a time

b) Translate one statement at a time and execute it

c) Translate the whole program to machine language

d) None of the other options

ANS: b) Translate one statement at a time and execute it


Q9.

If an Infinite language is passed to Machine M, the subsidiary which gives a finite solution to
the infinite input tape is ______________

a) Compiler

b) Interpreter

c) Loader and linkers

d) None of the mentioned

ANS : a) Compiler
Explanation: A Compiler is used to give a finite solution to an infinite phenomenon. Example
of an infinite phenomenon is Language C, etc.

Q10.

Languages of a automata is

a) If it is accepted by automata
b) If it halts
c) If automata touch final state in its life time
d) All language are language of automata

ANS: Answer: a) If it is accepted by automata

 Explanation: If a string accepted by automata it is called language of automata.


Q11.
Finite automata requires minimum _______ number of stacks.
a) 1
b) 0
c) 2
d) None of the mentioned
ANS:  b) 0    

Explanation: Finite automata doesn’t require any stack operation .

Q12.

The basic limitation of finite automata is that

a) It can’t remember arbitrary large amount of information.

b) It sometimes recognize grammar that are not regular.

c) It sometimes fails to recognize regular grammar.


d) All of the mentioned

ANS: a) It can’t remember arbitrary large amount of information.


Explanation: Because there is no memory associated with automata.

END of Assignment

You might also like