0% found this document useful (0 votes)
89 views

Modulewise Questions On All Module SPCC

This document contains a module-wise question bank for the subject System Programming and Compiler Construction. It has questions related to system software, assemblers, macro processors, loaders, compilers and parsing. The questions cover key concepts, with examples, about each of these topics and how they are involved in the process of developing and executing a program.

Uploaded by

Kritika Saini
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

Modulewise Questions On All Module SPCC

This document contains a module-wise question bank for the subject System Programming and Compiler Construction. It has questions related to system software, assemblers, macro processors, loaders, compilers and parsing. The questions cover key concepts, with examples, about each of these topics and how they are involved in the process of developing and executing a program.

Uploaded by

Kritika Saini
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Vasantdada Patil Pratishthan’s College of Engineering & Visual Arts

Module-wise Question Bank


Module 1
Q.1 What is the Difference between Application program and system programs?
( FH 23, FH-15,SH-15, FH-18, FH-19)

Q.2 Indicate the order in which following system programs used, from developing
program up to its execution. Assembler, loaders, linker, macro processor,
compiler, editor, debugger , macro, loader, linker, DBMS, OS, interpreter. And
also define each one details. (FH-15, FH-21)

Q.3 What are system programs? Why do we need them?(FH-17)

Q.4 What is forward reference table. (FH-19)

Q.5 What is Application of Software? (FH-17 ,FH-18) 2 marks

Q.6 How various system programs are involved to develop any program for
its execution? (FH-21)

Q.7 Define is system programming? List different system software with


suitable example. (FH-17)

Q.8 Explain the basic language processing activities.

Q.9 Compare Compiler and interpreter.(FH-16, SH-18,FH-18, FH-19)

Q.10 What is system software / Define System programming.(FH-15,FH-17 ,FH-18)

Module 2
Q.1 State the reason for assembler to be multi pass program.

Q.2 With reference to Assembler explain the following tables with suitable
examples. (i) POT (ii) ST (iii) MOT (iv) LT (v) BT (FH-15,FH-16,FH-
17,FH-18 ,FH-21)

Q.3 Explain databases used in Single pass assembler design with suitable example.

Q.4 Explain pass 2 assembler with flowchart.

Q.5 What is forward-reference problem? How does a single pass assembler solve
it? (FH-17,FH-18)

Q.6 Draw flowchart and explain with database working of pass 2 of assembler.
(FH 17,FH-18)

Q.7 Explain the types of assembly language statement

Department of Computer Engineering Subject: SPCC (TE SEM-VI) CSC601 Prof: Prajakta Khelkar
Vasantdada Patil Pratishthan’s College of Engineering & Visual Arts
Q.8 Consider the following Assembly Program : (FH-22) 10 Marks START
501
A DS 1
B DS 1
C DS 1
READ A
READ B
MOVER AREG A
ADD AREG B
PRINT C
END
Generate Pass 1 and Pass 2 and also show the content of database table involved in
it.

Q.9 Draw a neat flowchart of pass 1 of two pass assembler design.(FH-22 5 marks)

Q.10 Explain databases used in Single pass assembler design with suitable example.(FH-21
10 marks)

Module 3
Q.1 What is positional parameter in macro? (FH-16)

Q.2 Draw a flowchart and explain with databases the working of pass 1 of macro .

Q.3 What is Macro call, Macro expansion, Macro definition? How is


macro different from subroutine? ( FH-21 10 marks)

Q.4 Explain any two features of MACRO.

Q.5 Differentiate between Macro and function.

Q.6 Explain different pseudo-ops used for conditional macro expansion along with
an example.

Q.7 With reference to macro processor , explain the following tables with
suitable examples. i) MNT ii) MDT iii) ALA

Q.8 Consider following code. What will be the entry come under MNT ? The current values
for MDTC and MNTC are MDTC=1 and MNTC=1 (FH-22 -2 Marks)
MACRO
INCR4 &AR1, &AR2, &AR3
A 1, &AR1
A 2, &AR2
A 3, &AR3
MEND

Q.9 Define macro & Explain conditional macro, parameterized macro, Nested
macro with suitable example.(FH-21)
Q.10 Draw a neat flowchart of two pass macro processor.Explain with the help
of example.(FH-22) 10 marks

Department of Computer Engineering Subject: SPCC (TE SEM-VI) CSC601 Prof: Prajakta Khelkar

Vasantdada Patil Pratishthan’s College of Engineering & Visual Arts

Module-wise Question Bank


Module 4
Q.1 What are the functions of Loaders? Explain Compile and Go Loader Scheme
with advantages and Disadvantages. (FH-21)

Q.2 Explain the design of direct linking loader. (FH-23)

Q.3 What are the different functions of loaders?/ Explain function of loader(FH-
15,dec 16,FH-17,FH-18,FH-19,FH-22) 5 marks

Q.4 Explain the design of Absolute loader.and mention all the data structure
in details.(FH-17,FH-19)

Q.5 Explain difference between Linkage editor and linking loader. (Dec-18)

Q.6 Explain the working of Direct linking loader with example, showing entries
in different database built by DLL. (FH-17,FH-18) 10 marks

Q.7 Explain design of dynamic linking loader along with example. (Dec-15)

Q.8 Explain difference between Dynamic Linking loading and Dynamic linking
with example. (FH-16)

Q.9 Explain schemes of loader. (FH-17)

Q.10 What the basic difference is between assemble-and go loader


and Absolute loader? (FH-16)

Department of Computer Engineering Subject: SPCC (TE SEM-VI) CSC601 Prof: Prajakta Khelkar

Vasantdada Patil Pratishthan’s College of Engineering & Visual Arts

Module-wise Question Bank


Module 5
Q.1 Generate SLR parsing table for the following grammar.
S🡪DD

D🡪dD |e
Q.2 Explain various phases of compiler with suitable example.FH-18, SH-19
10 Marks FH-21 FH-22 5 marks

Q.3 What is the Difference between compiler and interpreter? FH-18,SH-18,FH-


19 5 Marks

Q.4 Define cross compiler. Explain in brief what activities are performed in
various phases of the compiler.

Q.5 Write a brief note on the compiler. Also mention the advantages
and disadvantages of a compiler.

Q.6 Explain various types of compiler.

Q.7 Explain the process of elimination of left recursion with example.

Q.8 Consider the grammar given below:


S-> A
A->bA |d
Test whether it is SLR or not?

Q.9 Difference between Top Down and Bottom-Up Parser with example.

Q.10 Find FIRST & FOLLOW for the following grammar and
LL(1) table
S🡪 Bb J Dd

B🡪 aB I C

D🡪cD | c FH-19 10 Marks

Q.11 What is a role of Finite Automata in lexical Analysis.

Q.12 Eliminate left recursion from the following grammar. SH-19 5


Marks S🡪(L) | x

L🡪 L,S | S

Q.13 Design parser LL(1), SLR, LALR.


S🡪 Bb J Dd

B🡪 aB I C

D🡪cD | c

Q.14 Describe Operator precedence with example.SH-19 4 marks

Q.15 Difference between LL Parser and LR Parser with example.

Q.16 Illustrate compilers internal presentation of source program for following


statement after each phase, position=initial rate*60, same can ask for different
example.

Q.17 Construct a predictive parsing table for following grammar.


S→ A
Department of Computer Engineering Subject: SPCC (TE SEM-VI) CSC601 Prof: Prajakta Khelkar

Vasantdada Patil Pratishthan’s College of Engineering & Visual Arts


A→ aB/Ad
B→ bBC/f
C→ g

Q.18 Which sentence/s is correct with respesct to lexical analyzer?FH-21 (2 marks)


1. Recognizing the tokens
2. To organize the variables in a lexical order
Building a literal and identifier table
i)1 only
ii)2 & 3 only
Iii)1, 2 & 3
Iv)1 & 3 only

Q.19 What will be the FOLLOW(A) for following grammar? FH-21 (2 marks)
S🡪AaAb

S🡪BaBb

A🡪ε

B🡪ε
i)Only a
ii)a, b
Iii)Only b
Iv)Only ε or also come for 10 marks in university exam ask for
different example.

Q.20 What do you mean by operator precedence grammar? With the help of
following given grammar pass it input string a+b*c*d. 2/5/10 Marks SH-19
FH-22 E🡪E+T/T

T🡪T*V/V

V🡪a/b/c/d

Q.21 Explain recursive descent parser with an example SH-18 10 Marks

Q.22 Explain block diagram of lexical analyzer (4 marks)/ write a note on


input buffering and also explain role of lexical analyzer. 10 marks FH-
19

Q.23 Constructe a predictive parsing table for the grammar FH-18 10


Marks E->TE’
E’->+TE’/ ε
T->FT’
T’->*FT’/ ε
F-> ( E) /id

Q.24 What is left factorial? Find first and follow for the following grammar . SH-19
10 Marks

Q.25 Describe or write a short note Syntax Directed Translation with attributes.SH-19
4 marks

Q.26 Describe S and L attributes. /Differentiates between Synthesized and


Inherited attributes with example. /Explain Synthesized and Inherited
attributes with example. FH-18 10 marks

Q.27 Test whether,the given grammar is LL(1) or not Construct LL(1)


Table. S ->AB/gDa
A->ab/c

Department of Computer Engineering Subject: SPCC (TE SEM-VI) CSC601 Prof: Prajakta Khelkar

Vasantdada Patil Pratishthan’s College of Engineering & Visual Arts


B->dC
C-->gC/g
D->fD/g
Where a,b,c,d,f, g are :terminals and S,A,B,C, D are Non terminal in
university exam ask different example. FH-22 5 Marks

Q.28 Explain the different error recovery Techniques. FH-18 10 marks

Q.29 Compare Pattern; Lexeme and token with example FH-22 5 Marks

Q.30 Describe LEX and YACC. FH-18,FH-19,SH-19 5/10 Marks

Module 6
Q.1 Generate Three address code. FH-19 FH-22 6 Marks
For(i=0;i<10;i++)
{
If (i<5)
a=b+c*3;
else
x=y+z;
} in university exam ask three address with different example.

Q.2 Explain loop optimization techniques with example.

Q.3 Explain DAG with an appropriate example.

Q.4 Generate Three address code for following code.FH-18 FH-22 6 Marks
While (x<y) do
if (p<=q) then
a=2*b
else
a=3*b in university exam ask three address with different example.

Q.5 Generate three address code for following, code


while(a< b) do
if(c<d) then
x=y+2
Else
x=y-2

Q.6 List and describe the different intermediate Code generation with example.

Q.7 Classify Machine Dependent and Machine Independent.

Q.8 Explain different code optimization technique along with an example. FH-
22 ( 5 Marks) FH-16, FH-17,SH-17,FH-18,SH-18 ( 10 marks )

Q.9 Explain Data Flow Analysis / Explain Basic and flow Graph. FH-17 10 Marks

Q.10 Explain three address like Triples and Quadruples code with
example FH-19, SH-18 5 Marks

Q.11 Explain loop optimization with example FH-15 10 Marks

Department of Computer Engineering Subject: SPCC (TE SEM-VI) CSC601 Prof: Prajakta Khelkar

Vasantdada Patil Pratishthan’s College of Engineering & Visual Arts


Q.12 Discuss different Issues in the design of code generator.
FH-18, FH-15 (10 Marks)

Q.13 Write a short note on Peephole Optimization. SH-15 , FH-22 5 Marks

Q.14 What are the different ways of representing Intermediate code? Explain
with example. FH-22 5 Marks

Q.15 Consider following Expression. FH-22 2 Marks - (p * q) + (r + s) – (p + q + r


+ s)
How many numbers of temporary variables are required to construct 3
address code?

Q.16 Which technique is applicable to optimize the given code? FH-21 2 marks
a=10;
for (j=0 ; j< a*2; j++)
{ x= j+2; }
i )Code Motion
Ii)Copy Propagation
Ii)Induction Variable Reduction
Iv) Common Sub-expression Elimination
Department of Computer Engineering Subject: SPCC (TE SEM-VI) CSC601 Prof: Prajakta Khelkar

You might also like