Search Header Logo

CD Lab Final Viva

Authored by Dileep R

Computers

Professional Development

Used 2+ times

CD Lab Final Viva
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Consider the following statements related to compiler construction :

I.                 Lexical Analysis is specified by context-free grammars and implemented by pushdown automata.

II.               Syntax Analysis is specified by regular expressions and implemented by finite-state machine.

Which of the above statement(s) is/are correct ?

Only I

Only II

Both

None

All

2.

MULTIPLE CHOICE QUESTION

2 mins • 8 pts

Consider the grammar

               S → aSAb | bSBc               A → +AB | ε

               B → *BC | ε                       C → aC | d

First(S) = {a, b},  First(A) = {+, ε}, First(B) = {*, ε}, First(C) = {a, d}

For the above What is in the Follow(S)?

{a, b, c, +, $}

  {a, c, +, *, $}

  {b, c, +, *, $}

{a, b, d, *, $}

3.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Match all items in Group 1 with correct options from those given in 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

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Type-checking is normally done during ____________

Lexical analysis

Syntax analysis

Syntax-directed translation

Code optimization

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which one of the following statements is FALSE?

Context-free grammar can be used to specify both lexical andsyntax rules

Type checking is done before parsing

High-level language programs can be translated to differentIntermediate Representations.

Arguments to a function can be passed using the program stack

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?