1000+ Compiler Design GATE Questions and Answers Pdf - 1

Question: 1

Compiler is a program that

(A) accepts a program written in a high level language and produces an object program

(B) appears to execute a source program as if is were machine language

(C) automates the translation of assembly language into machine language

(D) places programs into memory and prepares them for execution

Ans: A

accepts a program written in a high level language and produces an object program

Question: 2

Cross compiler is a compiler, which

(A) runs on one machine and produces object code for another machine

(B) is written in a language that is different from the source language

(C) is written in a language that is the same as the source language

(D) generates object code for its host machine

Ans: A

runs on one machine and produces object code for another machine

Question: 3

The output of lexical analyser is

(A) strings of characters

(B) set of tokens

(C) syntax tree

(D) a set of regular expression

Ans: B

set of tokens

Question: 4

A top down parser generates

(A) left most derivation in reverse

(B) left most derivation

(C) right most derivation in reverse

(D) right most derivation

Ans: B

left most derivation

Question: 5

A bottom up parser generates

(A) left most derivation in reverse

(B) right most derivation

(C) right most derivation in reverse

(D) left most derivation

Ans: C

right most derivation in reverse

Related Questions