CD VIVA

CD VIVA

University - Professional Development

10 Qs

quiz-placeholder

Similar activities

Compiler Parsing Techniques

Compiler Parsing Techniques

University

10 Qs

Compiler Design -Lexical analysis and Syntax analysis

Compiler Design -Lexical analysis and Syntax analysis

University

12 Qs

WINTER 24-25 CD

WINTER 24-25 CD

University

10 Qs

Parser - unit 2 and 3

Parser - unit 2 and 3

University

15 Qs

Compiler Design I

Compiler Design I

University

15 Qs

CDS1-Quiz

CDS1-Quiz

University

10 Qs

321 - Quiz07

321 - Quiz07

University

10 Qs

compiler design quiz

compiler design quiz

University

15 Qs

CD VIVA

CD VIVA

Assessment

Quiz

Computers

University - Professional Development

Hard

Created by

Praveena T

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The number of tokens in the following C statement is

printf("i = %d, &i = %x", i, &i);

3

26

10

21

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a compiler, keywords of a language are recognized during

parsing of the program

the code generation

the lexical analysis of the program

dataflow analysis

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following statements is FALSE?

Context-free grammar can be used to specify both lexical and syntax rules.

Type checking is done before parsing

High-level language programs can be translated to different Intermediate Representations.

Arguments to a function can be passed using the program stack.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon- and unit-production (i.e., of type A -> є and A -> a) to parse a string with n tokens?

n/2

n-1

2n-1

2n

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The grammar S → aSa | bS | c is

LL(1) but not LR(1)

LR(1)but not LR(1)

Both LL(1)and LR(1)

Neither LL(1)nor LR(1)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Match all items in Group 1 with correct options from those given in Group 2.

Group 1 Group 2

P. Regular expression 1. Syntax analysis

Q. Pushdown automata 2. Code generation

R. Dataflow analysis 3. Lexical analysis

S. Register allocation 4. Code optimization

P-4. Q-1, R-2, S-3

P-3, Q-1, R-4, S-2

P-3, Q-4, R-1, S-2

P-2, Q-1, R-4, S-3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following is a top-down parser?

Recursive descent parser.

Operator precedence parser.

An LR(k) parser

An LALR(k) parser

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?