You are on page 1of 61

Q.1] Differentiate between application and system software.

(May 2022),
(May 2018), (May 2019)
Or
Define System Programming. Differentiate between application and system
program.
Or
What is system software & application software? (Dec 2018), (May 2017)
Or
Differentiate between system program & application program? (May 2015)
Q.2] What are the functions of the loader? (May 2022)
Or
What are the different functions performed by the loader?
Or
What are the different functions of the loader? (Dec 2015)
Or
What is a loader? Explain the functions of the loader. (Dec 2016), (Dec
2019)
Or
Explain the different functions of the loader. (Dec 2018), (May 2015),
(May 2019)
Or
Explain various functions of the loader. (May 2017), (May 2018)
Or
What are relocation and linking concepts in loaders? (May 2022)
Q.3] Explain the different phases of the compiler with a suitable example.
(May 2022), (Dec 2015)
Or
What are the different phases of the compiler? (Dec 2015)
Or
Draw and Explain the various phases of compilers with suitable examples.
Q.4] What are the different ways of representing intermediate code? Explain
with an example. (May 2022)
Or
Explain the different forms of intermediate codes used by the Compiler.
Or
What are the different types of intermediate code? Explain their
implementation techniques.
Or
What is the various intermediate code form in detail? (Dec 2016)
Or
What are the different types of intermediate code? (Dec 2017)
Or
Explain the different types of intermediate code representations. (Dec 2018)
Q.5] Consider the following assembly program: -
START 501
A DS 1
B DS 1
C DS 1
READ A
READ B
MOVER AREG, A
ADD AREG, B
MOVEM AREG, C
PRINT C
END

Generate Pass 1 & Pass 2 and also show the content of the database table
involved in it. (May 2022)

Q.6]
A) Explain various code optimization techniques in detail. (May 2022)
Or
Explain different code optimization techniques along with an example.
(May 2017), (May 2018), (May 2019)
B) Explain different types of code optimization techniques in compiler
design. (May 2017), (Dec 2018), (May 2017)

Q.7]
A. What is code optimization? Explain machine-dependent code
optimization techniques with a suitable example.
B. Explain machine-independent code optimization techniques with a
suitable example. (Dec 2019)
—> See Above question’s answer.

Q.8] Test whether the given grammar is in LL(1) Parsing table.

Where a,b,c,d,f,g are the terminals and S, A, B, C, D are the Non-Terminals.


(May 2022)
Q.9] Draw a neat flowchart of Pass 1 of two pass assembler designs and
explain in detail. (May 2022), (May 2019)
Q.11] Compare pattern, lexeme, and token with an example. (May 2022)
Q.12] Draw a neat flowchart of two passes macro processor. Explain with the
help of an example. (May 2022)
Q.13] Explain the design of a direct linking loader. (May 2022)
Or
Explain the working of the DLL loader in detail.
Or
Explain the working of the Direct Linking loader with an example,
showing entries in different databases built by DLL. (Dec 2017), (May
2018)
Q.14] What is the forward reference problem? Explain single pass assembler
with flowchart.
Q.15] Explain the multi-pass assembler in detail.
Q.16] Show machine code generated for the following assembly-level
program along with data structure entries.
—> Learn it from book.
Q.17] Explain single pass macro processor.
Q.18] Explain the working of the macro processor along with the data
structures used in it.
Q.20] Modify the given grammar and construct a Predictive parser table
explaining each step.
E -> E+T|T
T -> T*V|V
V -> id.
Q.21] For a given grammar below, Construct an operator precedence relation
matrix, assuming *, + are binary operators and 'id' is the terminal symbol, and
E is Non-terminal.
E->E+E
E->E*E
E->id
A] Apply operator precedence parsing algorithm for the statement ' id +
id * id' (Dec 2015)
B] Apply operator precedence parsing algorithm to obtain skeletal
syntax tree for the statement ' id + id * id'(Dec 2016)
Q.22]Consider the following grammar:
S --> aSbS | bSaS | Epsilon.
1. Frame the transition table and action/goto table of the given grammar.
2. Demonstrate if the grammar is LR(0) or not.

Q.23] Explain the working of the shift-reduce parser along with a suitable
example.
—> See in the book.
Q.24] Discuss various issues that occur in the code generation phase of the
compiler.
Q.25] Define the various system software used in compilers.
—> Module-1 full anwer of this question.
Q.26] What is the need for system software?

Q.27] Explain various data structures used in assembler design.


—> See in the book.
Q.28] What is the need for an assembler to be multi-pass?
Q.29] Explain various types of statements used in assembler design
Q.30] What are the different functions performed by the macro processors?
—> See in the book.
Q.31] Explain Parameterized macro with a suitable example. (May 2018)
Q.32] Explain conditional macro with a suitable example. (Dec 2019)
—> See in the book.
Q.33] Enlist different types of noodles and explain compile and go loader in
detail.
—> See in the book.
Q.34] Explain the working of the absolute loader.
—> See in the book.
Q.35] What do you mean by relocation? Explain relocating loader in detail.
—> See in the book.
Q.36] Explain the difference between a linking loader and a linkage editor.
(Dec 2018)
Q.37] Explain the working of compiler phases for the following expression
Position = initial + rate * 60.
Or
Illustrate the compiler's internal representation of the source program for the
following statement after each phase
Position = initial + rate * 60 (Dec 2015)
—> Same as phase of compiler
Q.38] Explain the role of finite automata in lexical analysis.
—> See in the book.
Q.39] Design DFA for given finite automata. (a+b)*abb
https://slaystudy.com/construct-finite-automata-for-the-regular-expression-ab
abb/
Q.40]
A. Differentiate between top-down and bottom-up parsers techniques.
(May 2017), (Dec 2018), (May 2018), (Dec 2019)
B. Explain the recursive descent parser with an example. (May 2017)
Q.41] Define synthesized and inherited attributes used in the Syntactic
analysis of the compiler.
Q.42] Generate three address codes for the following logical expression. If
a<b then 1 else 0
Q.43] Design quadruple and triple for the following expression a=(b+c)*(d+e)
Q.44] Design DAG representation for a given expression. a=(a+b)*(a-c)
Q.45] Explain flow graphs and basic blocks in detail. (May 2017)
—> Module-6 page number. 6 & 8
Q.46] Write a short note on LEX and YACC. (Dec 2016), (Dec 2017), (May
2015), (May 2018), (Dec 2019)
Q.47] Explain with the help of the flowchart working of the two pass
assembler along with the databases used.
Or
what are the various databases used in two pass assembler design? Explain
with an example. (Dec 2016)
Or
Explain the design of two pass assemblers with a flowchart and databases?
(Dec 2017), (Dec 2019)
—> See in the book.
Q.48] Explain the different error recovery techniques used in compilers.
Or
Explain the different error recovery techniques. (May 2018)
Q.49] Detail the different features used in macro processing.
Or
Explain different features of macros with examples. (Dec 2018), (May 2019)
—> See in the book.
Q.50] What is the need for a linkage editor in System Programming? Explain
its, working in detail.

Q.51] Explain the working of the recursive descent Parser and Operator
Precedence Parcer with examples.
Q.52] Explain with a flowchart the working of the multipass macro processor
and the databases used.
Q.53] Distinguish between: -
a) Syntax tree and PArse trees
b) LL Parser and LR Parser (Dec 2017)
Q.54] Explain the handling of control structures and procedure calls in the
code generation phase of compilers.
Q.55] Short note on: -
a) Dynamic loading and linking
b) Code optimization Techniques
c) Syntax-directed translation (Dec 2016), (Dec 2017)
d) Code motion (May 2015)
e) Software tools (May 2015)
f) Left recursion (May 2015), (May 2017 - with example)
g) left factoring removal technique (May 2015)
h) Input buffering scheme on the lexical analyser (May 2017)
i) Syntax directed translation (Dec 2019)
Q.56] Differentiate between the application program and system software.
Indicate the order in which the following system programs are used, from the
developing program up to its execution.
Assemblers, loaders, linkers, Macro processors, compilers, editors. (Dec
2015)
Q.57] Eliminate left recursion in the following grammar(Remove direct and
indirect recursion) (Dec 2015)

S-> Aa|b
A->Ac|Sd|Epsilon
Q.58] Explain the role of code optimization in compiler designing. Explain
Peephole optimization along with an example. (Dec 2015)
Q.59] Explain synthesized and Inherited attributes used in Syntax Directed
Definition. (Dec 2015)
Or
Explain synthesized and Inherited attributes used in Syntax Directed
Definition. (May 2016)

Q.60] Find FIRST and FOLLOW sets for the given grammar below(Dec 2015),
(May 2016), (May 2018)

E -> TE’
E’ -> +TE’|Epsilon
T -> FT’
T’ -> *FT’|Epsilon
F -> (E)/id
Q.62] Explain the design of Dynamic Linking Loader along with an example.
(Dec 2015), (Dec 2019)

Q.63] For the following grammar construct LL(1) Parsing table.


S -> F
S -> (S - F)
F -> a
And Parse the string (a - a). Show the contents of the stack and i/p buffer and
the action taken after each step. (Dec 2015), (May 2019)

Q.64] Explain different pseudo-ops used for conditional macro expansion


along with an example. (Dec 2015)

Q.65] With reference to the assembler explain the following tables with
suitable examples. (Dec 2015), (May 2016), (May 2017), (May 2018), (May
2019)
a) POT
b) MOT
c) ST
d) LT
e) BT
Q.66] Explain Backpatching with an example. (Dec 2015)
Or
Backpatching with an example. (Dec 2016)
Q.67] What are finite automata in compiler theory? (Dec 2016), (May 2018)
Q.68] What are the different types of attributes in SDD? Explain with
examples. (Dec 2016)
Q.69] Explain two pass macro processors with flowcharts and databases.
(Dec 2016)
Or
Explain the working of two pass macro processors with neat flowcharts and
databases. (Dec 2017)

Q.70] Construct an SLR parsing table for the following grammar. Show how
parsing actions are done for input string() () $. Show stacks content, i/p
buffer, and action. (Dec 2016)
S -> (S)S
S -> Epsilon
Q.71] Explain different types of text editors in brief. (Dec 2017), (May 2017)
Q.72] What do u mean by operator precedence grammar? With the help of the
following given grammar, parse the input string “a+b*c*d”. (Dec 2017)
E -> E+T|T
T -> T*V|V
V -> a|b|c|d
https://www.youtube.com/watch?v=Rfth6gF5mrk
Q.73] Construct LL(1) parsing table for the following grammar: -
S -> aBDh
B -> cC
C -> bC|Epsilon
D -> EF
E -> g|Epsilon
F -> f|Epsilon
Check whether the string “acbgh” is valid or not. (Dec 2017)
Q.74] Discuss different issues in the design of the code generations. (Dec
2017), (Dec 2019)
Or
What are different issues in code generation, explain in detail, with examples.
(May 2015), (May 2016), (May 2018), (May 2019)
Q.75] Compare Compiler and Interpreter. (Dec 2018), (May 2018), (Dec 2019)
Or
What is the difference between Compiler and Interpreter? (May 2016)
Or
Explain the difference between Compiler and Interpreter. (May 2015)
Q.76] Write a short note on JAVA Compiler Environment. (Dec 2018), (May
2016), (May 2017)
Q.77] With reference to the macro processor, explain the following tables with
suitable examples: - (Dec 2018)
a) MNT
b) MDT
c) ALA
Q.78] Draw a flowchart and explain with databases the working pass-2 of
assembler. (Dec 2018)
Q.79] Consider the following grammar (Dec 2018)
S -> (A)|0
A -> SB
B -> ,SB|Epsilon
Q.80] Explain a recursive decent parser with an example. (Dec 2018)
Q.81] Explain the different phases of the compiler. Illustrate all the output
after each phase for the following statement. (Dec 2018), (May 2017), (May
2018)
a = b + c - d*5
—> Same as phase of compiler
Q.82] Short note on synthesized and inherited attributes with example. (Dec
2018), (May 2019)
Q.83] State the reason for the assembler to be a multipass program. (May
2015)
Q.84] What is a flow graph? State its significance in code generation. (May
2015)
Q.85] For the following code what will be the output generated by Pass 1 and
Pass 2 for two pass assemblers? Explain the database. (May 2015)
ABC Start 0
USING *,15
L 1, FIVE
A 1, FOUR
ST 1, TEMP
FOUR DC F’4’
FIVE DC F’5’
TEMP DS 1F
END
Q.86] Explain operator precedence parser along with an example. (May
2015), (Dec 2019)
Q.87] Generate three address codes for the following code. (May 2015),
(May 2019)
While(a<b) do
if (c<d) then
x = y +2
else
x=y-2
Q.88] Discuss with examples quadruple, triple and indirect triple. (May 2015)
Q.89] Construct a predictive parsing table for the following grammar. (May
2015)
S -> A
A -> aB| Ad
B -> bBC|F
C -> g
Q.90] Explain run time storage organization in detail. (May 2015), (May 2017)
Q.91] What is the role of automata in compiler theory? (May 2016)
Q.92] Eliminate left recursion in the following grammar (Remove Direct and
Indirect recursion) (May 2016)
S -> Aa|b
A -> Ac|Sd|Epsilon
Q.93] Explain with an example quadruples, triples, indirect triples. (May
2016)
Q.94] What is an activation record? Draw a diagram of the General Activation
record and explain the purpose of the different fields of an activation record.
(May 2016)
Q.95] What is the difference between Dynamic Loading and Dynamic Linking
explain with an example. (May 2016)
Q.96] For the following grammar construct LR(0) Parser table.
S -> aCDe
C -> Cbc
C -> b
D -> d
And parse the string abbcbcde. Show the contents of the stack and i/p buffer
and the action taken after each step. (May 2016)
Q.97] Draw and explain DAG and represent the following example with it.
(May 2016)
(a/b) + (a/b) * (c*d)
Q.98] What are the different phases of the Compiler? Illustrate the compiler
internal representation of the source program for the following statement
after each phase (May 2016)
Amount = P + P * N * R / 100
Q.99] Draw a flowchart and explain with databases the working pass 1 of the
macro processor. (May 2017)
Q.100] Explain the design and flowchart of the absolute loader. (May 2017)
Q.101] Compare LR(0), LR(1), and LALR parsers.
Construct LR(0) parser table for the following grammar: - (May 2017)
S -> (L)|id
L -> S|L, S
Variables: S and L
Terminals: ( id , )
Q.102] Explain different ways to represent three address codes. (May 2017)
Q.103] Explain the different storage allocation strategies in detail. (May 2018)
Q.104] Explain shift reduce parser in detail. (May 2018)
Q.105] Enlist the different types of errors that are handled by Pass 1 and Pass
of assembler. (Dec 2019)
Q.106] What is the need of Intermediate code generation? Explain any two
intermediate generation forms with examples. (Dec 2019)
Q.107] What is left factoring? (Dec 2019)
Q.108] Find FIRST and FOLLOW sets for the given grammar below: - (Dec
2019)
S -> Aa
A -> B D
B -> b|Epsilon
D -> d|Epsilon
Q.109] What are the phases of the Compiler? Give the working of each phase
for the following statements: - (Dec 2019)
int a, b, c = 1;
a = a*b -5*3/c;
Q.110] Eliminate left recursion in the following grammar: - (Dec 2019), (May
2019)
S -> (L)|x
L -> L,S|S
Q.111] Explain different assembler directives with example. (Dec 2019)
Q.112] Explain the forward reference problem and how it is handled in
assembler design. (May 2019)
Q.113] Explain macro and macro expansion. (May 2019)
Q.114] Find FIRST and FOLLOW sets for the given grammar below: - (May
2019)
S -> Bb|Dd
B -> aB|Epsilon
D -> cD|Epsilon
Q.115] Apply dead code elimination techniques for following code (May
2019)
int count;
void foo()
{
int i;
i = 1;
count = 1;
count = 2;
return
count = 3;
}
Q.116] Explain different types of loaders in detail. (May 2019)

You might also like