CD Quiz Batch B2 1a and 1 b programs

CD Quiz Batch B2 1a and 1 b programs

University

8 Qs

quiz-placeholder

Similar activities

Jaringan Nirkabel - Pertemuan 3

Jaringan Nirkabel - Pertemuan 3

University

10 Qs

CID421 Introduction to 3D CAD SOLIDWORK

CID421 Introduction to 3D CAD SOLIDWORK

University

12 Qs

ESBrotherX_Medical AI_Lecture

ESBrotherX_Medical AI_Lecture

University

7 Qs

Video Watermaking

Video Watermaking

University

11 Qs

bts

bts

KG - Professional Development

13 Qs

UAS SISTEM PENDUKUNG KEPUTUSAN SUSULAN

UAS SISTEM PENDUKUNG KEPUTUSAN SUSULAN

University

10 Qs

Microcontroller

Microcontroller

11th Grade - University

10 Qs

Tin 8/1

Tin 8/1

KG - University

10 Qs

CD Quiz Batch B2 1a and 1 b programs

CD Quiz Batch B2 1a and 1 b programs

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Sneha M

Used 8+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Yacc implements which parser?

LALR

CLR

SLR

LR(0)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which part produces the target code from the intermediate representation of source code?

Lexical Analysis

Synthesis

Analysis

None

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Phase of the compiler identifies the error(if present) in the following C code:

a+b=c;

Lexical analysis

Syntax analysis

Semantic analysis

There are no errors in the code

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Calculate the FIRST set for the following grammar

S → aBDh | C

B → cC

C → bC / ∈

D → EF

E → g / ∈

F → f

First(S) = { a,b,∈} First(B) = { c } First(C) = { b , ∈ } First(D) = { g , f } First(E) = { g , ∈ } First(F) = { f}

First(S) = { a,b} First(B) = { c } First(C) = { b , ∈ } First(D) = { g , f, ∈} First(E) = { g , ∈ } First(F) = { f}

First(S) = { a,b} First(B) = { c } First(C) = { b , ∈ } First(D) = { g , f } First(E) = { g} First(F) = { f }

None of the above

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Compute Follow set for the following grammar for constructing the predictive parsing table:

S → AB

A → aB / AdC

B → b | ∈

C → g

Fo(S) = { $ }

Fo(A) = { $,d,b}

Fo(B) = { $,d,b}

Fo(C) = { $,d,b }

Fo(S) = { $ }

Fo(A) = { d,b,∈}

Fo(B) = { b,d,b}

Fo(C) = { d,b,∈ }

Fo(S) = { $ }

Fo(A) = { ∈,d,b}

Fo(B) = { $,d,b}

Fo(C) = { $,d,b }

First(S) ={ a, b} First(A) = { a } First(A’) = { d , ∈ } First(B) = { b ,∈} First(C) = { g }

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a predictive parsing table in compiler design?

To store the parsing rules for each non-terminal symbol

To generate the intermediate code from the source code

To optimize the lexical analysis phase

To execute the target code directly

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the role of a syntax analyzer in the compilation process.

To convert the source code into tokens

To check the syntax of the source code based on the grammar rules

To generate the final executable code

To perform optimization on the intermediate code

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the significance of the LR(0) parser in compiler construction?

It is used to perform lexical analysis

It is a type of shift-reduce parser

It is capable of handling left-recursive grammars

It is used to generate the abstract syntax tree