Вы находитесь на странице: 1из 28

Vadodra Institute of Engineering Semester: V (2019)

and&Technology
Subject Name: System Programming
Subject Code:2150708
Faculties : Prof. Zarana Patel

CHAPTER 1 – Overview of System Software Marks


SHORT QUESTIONS
1 Which system software always resides in main memory? What kind of input this system 01
software takes? (Nov-2016)
2 Define: System software. 01
3 Define: System programming. 01
4 Explain the terms Specification Gap and Semantic Gap. 01
5 Explain the static and dynamic binding. 01
6 Need of MAR register. 01
7 Define: Base relative addressing. 01
8 Draw SS instruction format. 01
9 Define: Indirect addressing. 01
10 Define: Immediate addressing. 01
11 Define: Software. 01
12 Difference between RISC & CISC structures. 01
13 List the software hierarchy. 01
14 List any two system structure. 01
15 List various stages of a source program. 01
DESCRIPTIVEQUESTIONS
1 Define software. Compare system software and application software. 04,03,03
Differentiate system and application software. (May-2017) (May-2018) (Jun-2019)

2 What is mean by system programming? List some essential characteristics of system 04


Programming.
3 What is interface? Describe various types of interfaces. 07
4 Explain various stages of life cycle of source program. (Dec-2015) 07
5 Explain system software development process in detail. 07
6 Compare user-centric view and system-centric view of system software. (May-16) 07
7 Describe the level of system software.(Nov-2016) 03
8 Explain Life cycle of source program with neat sketch.(May-2018) 07,03
Draw neat sketch diagram of Life cycle of a source program.(Jun-2019)
9 Explain different kinds of system software.(Nov-2017) 03
10 How the use of programming language can help in making the software reliable?(Nov- 04
2018)
CHAPTER 2 – Overview of Language Processors
TOPIC:1 Programming Languages and Language Processors
SHORT QUESTIONS
1 Explain the term Execution Gap. (May-2011) 01
2 Explain the term Language Migrator. (May-2011) 01
3 State whether the following statements are true or false. Justify your answer. 01
Knowledge of software engineering helps us to bridge the semantic gap (Dec-2013)
4 (i) A bridges an execution gap to the machine Language of a 03
computer system.
(1) Detranslator, (2) Preprocessor, (3) Language translator

System Programming (2150708) 2019 Page 1


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
(ii) A bridges the specification gap between two programming
Languages.
(1) Interpreter (2) Language Migrator (3) Compiler
(iii) Syntax analysis processes the string of tokens built by to determine
the statementclass.
(1) Semantic Analysis (2) Lexical Analysis (3) Itself (June-2013)
5 A is a language processor which bridges an execution gap but is not a language 01
translator.
6 An interpreter is a language processor which bridges gap without generating a 01
machine language program.
7 Define the following terms. 02
1) Forward Reference 2) pass (Dec-2013)
8 A is a language processor which bridges an execution gap but is not alanguage 01
translator. (Nov-2016)
9 Justify (True/False): A language migrator provides portability of program. (Nov-2016) 01
10 Difference between Procedure oriented language and Problem oriented language. (Nov-2016) 01

11 Define:Language processor. (May-2017) 01


12 Define: Backpatching. (May-2017) 01
13 Define: Semantic gap. (May-2017) 01
14 Define: Specification gap. 01
15 A languagemigratorbridges gap between two programminglanguages. 01
[A] Execution gap [B] Semantic gap [C] Specification gap [D] All of above
16 Define: Preprocessor. 01
17 Define: Detranslator. 01
18 Define problem and procedure oriented programming languages. 01
19 Is macro processing a phase in compilation? Justify your answer. 01
20 Why is buffering used in lexical analysis? 01
21 Parserverifies whether the input string can be generated from the grammar of 01
The source language.
22 Language Migratoris a program that reads a program written in one language and 01
Translates it into an equivalent program in another language.
23 Define Lexeme. 01
24 Define optimizing compiler. 01
25 What is the purpose of semantic analysis in a compiler? 01
26 What are cousins of a compiler? 01
27 What does the front end of a compiler do? 01
28 What are the classifications of a compiler? 01
29 What is a symbol table? 01
30 What does the back end of a compiler do? 01
31 Define compiler-compiler. 01
32 List the various compiler construction tools. 01
DESCRIPTIVEQUESTIONS
1 Define Following terms: 04
1. SystemSoftware
2. SemanticGap
3. SpecificationGap
4. ExecutionGap (Dec-2015)
2 Compare Problem oriented and Procedure oriented languages (May-2014) (Dec-2015) 03,03

System Programming (2150708) 2019 Page 2


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
3 Explain following. (1) Execution Gap (2) Interpreter (3) Phases of Compiler (4) Language 04
Migrator (May-2011)
4 Define: Language processor. Also list different types of language processors.(Oct-2016) 04

5 Define: Language processor, Language migratory, Backpatching, SSM. (May-2017) 04

6 Define following terms: 1) Assembler 2) Macro 3) Parsing 4)Interpreter (May-2018) 04

7 Define the following terms:(Nov-2017) 04


1) Backpatching 2)Simple phrase grammar 3)Left recursion 4)Top-Down Parsing.
8 Which activity reduce specification gap? Explain with suitable example. Who will reduce 07
execution gap? (Nov-2017)
9 Explain the front end of toy compiler with suitable example.(Nov-2017) 07
10 Which type of gap makes the software buggy or unreliable? Which methods can be used to 03
overcome this situation? (Nov-2018)
11 Define following: Language Migrator, Execution gap, Token, Handle? (Jun-2019) 04

TOPIC:2 Language Processing Activities


SHORT QUESTIONS
1 phase performs type checking task. (May-2017) 01
[a] Lexical analysis [b] Syntax analysis [c] Semantic analysis
2 Define: Intermediate code. (May-2017) 01
3 Which phase of compiler will generate error if semicolon is missing in a C program? (May- 01
2017)
4 Describe the output of lexical analysis. (Nov-2016) 01
5 is not part of synthesis phase of compiler. 01
[A] Memory allocation [B] Code generation [C] Code optimization [D] Semantic analysis
6 Semantic Analysis Phase performs type checking task. [a] Lexical Analysis [b] Syntax 01
Analysis [c] Semantic Analysis. (May-17-NEW)
Answer: Semantic Analysis
7 An Interpreter is a language processor which bridges an execution gap but is not a language 01
translator. (Nov-16-NEW)
8 Justify (True/False): A language migrator provides portability of program. (Nov-16-NEW) 01
Answer: True

DESCRIPTIVEQUESTIONS
1 Explain language processing activities. (Dec-2015) 07
2 Explain analysis phase of language processor in detail. (Oct-2016) 07
TOPIC:3 Fundamental of Language Processing
SHORT QUESTIONS
1 Explain the static and dynamic binding. 02
2 ruleswhichgoverntheformationofvalidstatementsinthesourcelanguage. 01

3 Define: Parse tree. (May-2017) 01


DESCRIPTIVEQUESTIONS
1 List various phases of a language processor. Explain roles of phases of Language Processor. 07,07
Also explain symbol table (Dec-2011) (Dec-2015)
2 List various phases of Language Processor. Explain any one phase in detail. (May-2016) 07

System Programming (2150708) 2019 Page 3


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
3 What is main task of semantic analysis phase? Explain inherited and synthesized attributes in 07
detail with example. (May-2017)
4 Explain Analysis and Synthesis phase of Compiler.(Jun-2019) 07
Perform lexical, syntax and semantic analysis on below C statement:
int i;
float a, b;
a = b + i;
TOPIC:4 Search Data structures
SHORT QUESTIONS
1 Define: Symbol table. (May-2017) 01
DESCRIPTIVEQUESTIONS
1 What is Symbol table? Explain how one can organize Symbol table using Linear Data 07
Structure? (May-2016)
TOPIC:5 Allocation Data structure
SHORT QUESTIONS
1 A is a nonlinear data structure which permits allocation and deallocation of 01
entries in a random order.
DESCRIPTIVEQUESTIONS
1 State different storage allocation strategies. Explain static allocation and stack allocation in 04
detail. (May-2017)

CHAPTER 3 – Assemblers
TOPIC:1 Elements of Assembly Language Programming, Design of
theAssembler, Assembler DesignCriteria
SHORT QUESTIONS
1 Explain following : Assembler directives (Jan-2013) 01
2 Define: Assembler 01
3 Assembly language programs are written using [A] Hex code [B] Mnemonics [C] 01
ASCIIcode [D] None of these
Answer–[B]
4 The instruction DEC N inform the assembler to [A] Decrement the content of N [B] 01
Decrement the data addressed by N [C] Convert signed decimal number to binary [D] None
of the above
Answer –[A]
5 Instructions performing actions in assembly language are called [A] imperative 01
statements[B] declarative statements [C] directive statements [D] none of the above
Answer–[A]
6 What is the content of Stack Pointer? [A] Address of the current instruction [B] Address 01
ofthe next instruction [C] Address of the top element of the stack [D] None of the
aboveAnswer–[C]
7 Which of the following interrupt has highest Priority? [A] INTR [B] TRAP [C] RST 7.5 01
[D]RST 6.5
Answer–[B]
DESCRIPTIVEQUESTIONS
1 Which are the different assembly language statements? Explain each of them with suitable 07
example (Dec-2014)
2 Explain assembly scheme with suitable example. (May-2011) 07
3 Explain analysis and synthesis phases of an assembler by clearly stating their tasks. (Dec- 07
2011)

System Programming (2150708) 2019 Page 4


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
4 Briefly Explain the tasks performed by analysis & synthesis phases of simply assembly 07
schemes. (Jun-2013)
5 Define the Assembler (Jun-2013) 3.5
6 Define Assembler. List out tasks performed during different phase of assembler.(Jun-2019) 3

TOPIC:2 Types of Assemblers, Two-Pass Assemblers, One-


PassAssemblers
SHORT QUESTIONS
1 In two pass assembler, the object code generation is done during pass. 01
2 The assembler in first pass reads the program to collect symbols, and stores the min 01
table.
3 Difference between Literal and Constant. (Nov-2016) 01
4 What is the use of POOLTAB in assembler? (Nov-2016) 01
5 State true/false: Single pass assemblers cannot handle forward references. (May-2017) 01
6 State true/false: Symbol table is used to store mnemonics and opcodes. (May-2017) 01
7 Define: Single pass Assembler. 01
8 Define: two pass Assembler. 01
9 Write various types of assemblers. 01
10 List various declarative statements. 01
11 List various imperative statements. 01
12 List various assembler directives. 01
13 Define: Intermediate code. 01
14 List difference between variant I & II. 01
15 Define: Forward reference. 01
16 Define: Back patching. 01
17 What is a forward reference? 01
18 What is program block? 01
DESCRIPTIVEQUESTIONS
1 Explain use of various data structures (tables) needed in PASS I of the assembler. Also give 07
details of their fields. Explain various suitable data structures for the symbol table (Jan-
2013)
2 Explain Assembler directives (any three). (Jan-2013) 03
3 Consider following assembly program. Show 07
(i) Contents of SymbolTable
(ii) intermediate codes using Variant Irepresentation
(iii) corresponding machine codes: - (Jan 2013)
START100
READ A
READ B
READ C
MOVER AREG, A
ADD AREG, B
ADD AREG, C
MULT AREG,C
MOVEM AREG, RESULT
PRINTRESULT
STOP
A DS 1

System Programming (2150708) 2019 Page 5


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
B DS1
C DS1
RESULT DS 1
END
Instruction opcodes:
READ – 09, MOVER – 04, MOVEM – 05, ADD – 01,
MULT – 03, PRINT – 10, STOP – 00
Assembler-directive codes: START – 01, END - 02
Register code: AREG – 01 (Jan-2013)
4 Given the source program: 07

START 100
A DS 3
L1 MOVER AREG,B
ADD AREG,C
MOVEM AREG,D
MOVER BREG,=‟2‟
MOVER CREG,=‟4‟
D EQUA+1
L2 PRINTD
LTROG
=‟2‟
=‟4‟
ORIGIN A-1
C DC 5
ORIGIN L2+3
STOP
B DC„19‟
END L1
=‟5‟
1) Show the contents of symbol table at the end of pass I.
2) Explain the significance of EQU and ORIGIN statements in theprogram and explain how
they are processed by the assembler.
3) Show the intermediate code generated from the program (Dec-2013)
5 Given the source program: 07
START 200
X DS 4
L1 MOVER AREG,Y
SUB AREG,Z
MOVEM AREG,W
W EQU X+2
L2 PRINT W
ORIGIN X-5
Z DC „9‟
ORIGIN L2+1
STOP
Y DC „7‟
END
1) Show the contents of symbol table at the end of passI.
2) Explain the significance of EQU and ORIGIN statements in the program and explain how
they are processed by the assembler.
3) Show the intermediate code generated from the program (Dec-2013)
System Programming (2150708) 2019 Page 6
Vadodra Institute of Engineering Semester: V (2019)
6 and&Technology
Let us consider a two pass assembler and assume that each instruction is one word. Given 07
an assembly program and code for Mnemonics.
START101 Mnemonics CODE

READA STOP 00

READB MULT 03

MOVER BREG,A MOVER 04

MULTB REG, B MOVEM 05

MOVEM BREG,D READ 09

STOP DS 02

ADS 1 START 01

BDS 1 END 02

DDS1 Ordinal number of BREG is2

END

(i)Show content of symbol table at the end of pass-one of an assembler.


(ii)Write intermediate code representation of the assembly program. Use
Variant-II of intermediate code representation. (May-2011)
7 Given an assembly language program for finding factorial of a given number N with 07
Mnemonic code details. Write an equivalent machine language program

(Jun-2013)
8 Explain the role of Mnemonic Opcode Table, Symbol Table, Literal Table and POOL Table 07
in assembling process of assembly language program. (May-2011)
9 Compare single pass assembler and two pass assembler. Explain two pass assembler in detail 07
with suitable example. (May-2011)
10 Explain and show usage by giving examples of following assembler directives: 07
ORIGIN,EQU,LTORG, START (Dec-2011)
11 Describe following data structures: OPTAB, SYMTAB, LITTAB and POOLTAB (Dec- 07,07,04,04
2011) (May-2017) (May-2018) (Jun-2019)
12 Explain two pass assembler. (May-2012) 07
13 Explain the data structure of single pass assembler. (May-2012)(Nov-2017) 07,07

System Programming (2150708) 2019 Page 7


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
Explain in detail- use of various data structures (table) needed in pass-I of the assembler.
Explain various suitable data structures for the symbol table. (Oct-2016)
14 Compare Variant I and Variant II of intermediate code generation for assembler? (Dec-2013) 04

15 Explain the complete working of first pass of the double pass assembler along with the data 07,07
structure used. (Dec-2013)
Explain in brief the design of a Two pass assembler. (Oct-2016)
16 Draw a flowchart of maintaining Table of Incomplete Instruction (TII) in assembler (Dec- 03,03
2013) (Nov-2017)
17 Briefly explain the tasks performed by analysis and synthesis phases of simple assembly 07
schemes (June-2013)
18 Write difference between one pass and two pass assembler. (Jun-2013) 03
19 What are advanced assembler directives? Explain any two with suitable example. (Jun- 07,07
2013) OR
Explain advanced assembler directives with suitable example. (Dec-2015)
20 What is a forward reference? Explain how to solve it. 07
21 Define forward references. How it can be solved using back-patching? Explain with 07,03
example. (Dec-2015) (Jun-2019)
22 Define relative and absolute expression. 07
23 Consider the following assembly program: 07
START 500
READ N
MOVER CREG, ZERO
BK READ A
MOVER AREG, A
COMP AREG, MAX
BC LE, NT
MOVEM AREG, MAX
NT ADD CREG, ONE
COMP CREG, N
BC LT, BK
PRINT MAX
STOP
N DS1
A DS1
ZERO DC „0‟
ONE DC „1‟
MAX DC „0‟
END
Instruction opcodes:
READ-09, MOVER-04,MOVEM-05, ADD-01,COMP-06, BC-07, PRINT-10,
STOP-00
Assembler directive codes: START 01, END-02
Register code: AREG-01, CREG-03
1. Identify task performed by aboveprogram.
2. Generate symboltable
3. Show intermediate code generated by above program (May-2014)
24 Explain use of various data structures needed in pass-I of the assembler and give details of 07
their fields (Dec-2014)
25 List out various assembler directives. Explain any three with example. (Dec-2014) 07
26 Given the following source program and code for mnemonics: 07

System Programming (2150708) 2019 Page 8


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
1. Show the content of the symbol table at the end of pass-I of a two passassembler.
2. Show the intermediate code generated for program using variant-I of intermediate
code representation. Assume that each instruction is oneword.

(Dec-2014)
27 Consider following assembly language program: 07
Show (i) Contents of Symbol Table (ii) Intermediate codes using Variant I representation.
Instruction opcode: STOP – 00, ADD – 01, MULT – 03, MOVER – 04, MOVEM – 05,

COMP – 06, BC – 07, READ – 09, PRINT – 10, LE – 02 Assembler directives: START –
01, END – 02
Declaration statements: DC – 01, DS – 02
Register code: BREG – 02, CREG – 03 (Dec-2015)
28 What are the Advanced Assembler Directives? Explain any two with example. (May- 07
2016)
29 Given the source program: 07,07

System Programming (2150708) 2019 Page 9


Vadodra Institute of Engineering Semester: V (2019)
and&Technology

(a) Show the contents of the symbol table at the end of Pass I.
(b) Explain the significance of EQU and ORIGIN statement in the program and explain how
they are processed by the assembler.
(c) Show the intermediate code generated for the program. (May-2016)(May-2018)
30 Given assembly program and instruction opcode. Show data structure of pass-I assembler. (Oct- 07
2016)

System Programming (2150708) 2019 Page 10


Vadodra Institute of Engineering Semester: V (2019)
and&Technology

31 Explain Symbol table and Mnemonics table with suitable example (June-2013) 04
System Programming (2150708) 2019 Page 11
Vadodra Institute of Engineering Semester: V (2019)
32 An assembly program contains the statement
and&Technology 04
X EQU Y+25
Indicate how the EQU statement can processed if
(1) Y is a back reference
(2) Y is a forward reference (Nov-2016)
33 Write the data structure, intermediate code of following assembly program. Write the 07
assembly program output if value of N = 5.
START 101
READ N
MOVER BREG, ONE
MOVEM BREG, TERM
AGAIN MULT BREG, TERM
MOVER CREG, TERM
ADD CREG, ONE
MOVEM CREG, TERM
COMP CREG, N
BC LE, AGAIN
MOVEM BREG, RESULT
PRINT RESULT
STOP
N DS1
RESULT DS1
ONE DC„1‟
TERM DS 1
END (Nov-2016)
34 Given the following source program 07
START 300
A DS 5
L1 MOVER AREG, B
ADD AREG, C
MOVEM AREG,D
D EQU A +1
L2 PRINT D
ORIGIN A –2
C DC„52‟
ORIGIN L2 + 3
STOP
B DC„46‟
ENDL1
Show the Intermediate code generated for the program. (May-2017)
35 Explain in brief design of a two pass assembler. (May-2017) 07
36 Define forward references. How it can be solved using back-patching.(May-2018) 03
37 Explain the difference between literal and constant in assembler with its syntax. Why 03
POOLTAB is requiring? (Nov-2017)
38 Consider the assembly program fragment 07
START 200
READ A
LOOP MOVER AREG,A
SUB AREG,=‟1‟
BC GT,LOOP
STOP
A DS 1

System Programming (2150708) 2019 Page 12


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
What will be the intermediate code for the above program fragment? What does START
directive do? What will be the difference if ORIGIN directive is used in place of START?
(Nov-2018)
39 Consider the assembly program fragment, 07
MOVER CREG, B
ADD CREG, =‟1‟
BC ANY,NEXT
LTORG
=‟5‟
=‟1‟
SUB AREG,=‟1‟
END
=‟1‟
(i) Explain LTORGdirective.
(ii) Explain the entries in mnemonic opcodes table as per above codefragement.
(iii) How table of literals will be manipulated? (Nov-2018)
40 Compare Variant I and Variant II of intermediate code generation for assembler. 07
Write intermediate code for Variant I and Variant II of below programfragment.
START 200
READ A
LOOP MOVER AREG, A
.
.
.
SUB AREG,=‟1‟
BC GT,LOOP
STOP
A DS 1
LTORG
… (Jun-2019)
TOPIC:3 Advanced Assembly Process, Variants of Assemblers Design
oftwo pass assembler
SHORT QUESTIONS
1 is not an assemblerdirective. 01
[A] ORIGIN [B] START [C] EQU [D] DC
DESCRIPTIVEQUESTIONS
1 Explain & compare various intermediate code forms (representations) for an assembler. 07
(Dec-2011)
2 Define and explain different intermediate code representations. (May-2017) 04
3 Explain in detail any two advanced assembler directives. (May-2017) (May-2018) 07,04
4 Explain and compare two variants of intermediate code. (May-2017) 04
5 Compare various intermediate code forms for an assembler. (May-2018) 03
6 Explain the use of intermediate code with example in assembler and also mention field of 04
it. (Nov-2017)
7 List out assembler directives and explain any two advance assembler directives.(Jun-2019) 07

CHAPTER 4 – Macro and Macro Processors


TOPIC:1 Introduction, Macro Definition andCall
SHORT QUESTIONS
1 Define the Macro (June-2013) 01
2 Compare the macro and subroutine. 02
System Programming (2150708) 2019 Page 13
Vadodra Institute of Engineering Semester: V (2019)
and&Technology
3 State a primary difference between formal and actual parameter of macro. 01
DESCRIPTIVEQUESTIONS
1 Compare the features of subroutine and macros with respect to following. 07
(i) Execution speed
(ii) Processing requirement by assembler.
(iii) Flexibility and generality. (May-2011)
TOPIC:2 Macro Expansion, Nested Macro Calls
SHORT QUESTIONS
1 is designed to hold the value of formal Parameters during 01
expansion of macro call. (1) Actual Parameter Table (2) Macro Name Table (3)Expansion
time variable table (June-2013)
2 Define the macro and nested macro. 02
3 A macro is a unit ofspecificationfor through 01
expansion.(May-2011)
4 Macro definition is enclosedbetweena statement and 01
a statement. (May-2011)
5 A lexical expansion is typically employed to replace occurrence of formal parameters by 01
corresponding actual parameters. (StateTrue/False) (May-2011)
6 Default specification of parameters is useful in situations where a parameter has the different 01
value in most calls. (State True/False) (May-2011)
7 Macro definition table is maintained to hold value of sequencing symbols. (State True/False) 01
(May-2011)
8 Define: nested macro. 01
9 Define: Semantic expansion. 01
10 Define: lexical expansion. 01
11 Functions of macro pre-processor. 01
12 List various macro processors. 01
13 Define: One pass macro processor. 01
14 Define: Two pass macro processor. 01
DESCRIPTIVEQUESTIONS
1 Explain macro expansion in details. (June-2013) 07
2 Write a macro which takes A,B, C and D as parameters and calculates A*B+C*D in AREG. 06
(Dec-2013)
3 Explain positional parameters, keyword parameters and default value parameters for 03
macros.(Jan-2013)
4 Illustrate expansion of nested macro calls by giving example. (Jan-2013)(Oct-2016) 03,03

5 Write a macro which takes B, C, and D as parameters and calculates B*C + C*D. (May- 03
2011)
6 Define a macro taking A and B as parameters to compute A = A * B + B * B + A + B (Jan- 04
2013)
7 Explain attributes of formal parameters, default specifications of parameter and semantic 07,03
expansion for macro by giving examples. (Dec-2011)
Explain attributes of formal parameters in macro with syntax. (Nov-2016)
8 Define two macros of your choice to illustrate nested calls to these macros. Also show their 07,07
corresponding expansion. (Dec-2011) (Dec-2015)
9 Write and explain the algorithm for macro expansion.(Oct-2016)(May-2017) 07,04
10 Define a macro taking A and B as parameters to compute A = A * B + B * B + A.(Oct- 03
2016)
11 Describe the use of stacks in expansion of nested macro calls with example. (Nov-2016) 07

System Programming (2150708) 2019 Page 14


Vadodra Institute of Engineering Semester: V (2019)
12 and&Technology
Explain nested macro call with example. (May-2017) (Jun-2019) 07,03
13 Write a macro which takes A, B, C, and D as parameters and calculates A=B+B*C+C*D. 07
(May-2017)
14 Give suitable example for nested macro call with its data structure.(Nov-2017) 07
15 Give suitable example for macro by using conditional expansion or expansion time loops. 04
(Nov-2017)
16 Explain attributes of formal parameter and expansion time variable in macro. (Nov-2017) 04

17 Write Macro definition for adding two numbers that uses positional and keyword 03
parameters.(Nov-2018)
18 Write a macro definition for adding two numbers 10 times. Use nested macro call to 04
increment numbers by 1 every time in 10 iterations.(Nov-2018)
19 Explain attributes of formal parameter and expansion time variable in macro.(Jun-2019) 04

TOPIC:3 Advanced Macro Facilities


DESCRIPTIVEQUESTIONS
1 Explain advanced macro programming facilities. Give examples. (Jan-2013)(Dec- 07,07,07
2015)(May-2017)
2 Explain advanced macro facilities with suitable example. (May-2011) 07
3 Explain following advanced macro facilities: 07
(i) Alteration of flow of control duringexpansion
(ii) Expansion time variables (June-2013)
4 Explain with examples - expansion time variables, expansion time 07,07
Statements - AIF and AGO for macro programming. Show their usage for expansion time
loop by giving example. (Dec-2011) (May-2018)
5 Explain with examples - expansion time variables.(May-2014) 07
6 Statements - AIF and AGO for macro programming. Show their usage for expansion time 07
loop by giving example. (Dec-2011)
7 Explain following facilities for expansion time loop with example. 04,04
(1) REPT statement (2) IRP statement (May-2016)
Describe the use of REPT and IRP statement. (Nov-2016)
8 Write Macro definition with following and explain. (Nov-2018) 07
(i) Macro using expansion timeloop
(ii) Macro with REPTstatement
TOPIC:4 Design Of a Macro Pre-processor
SHORTQUESTIONS
1 A is designed to hold the names of all macro defined 01
in a program.(May-2011)
2 Define the following term: literals (Dec-2013) 01
3 The translator which performs macro expansioniscalled . 01
4 Atablecalled is designed to hold the values of formal parameters during the 01
expansion of a macro call.
5 State whether the following statements are true or false. Justify your answer. 02
1. Constants and literals are two names having the samemeaning.
2. When KPDTAB is empty, KPDTP set to „0‟. (Dec-2013)
6 Define: Macro assembler. (May-2017) 01
7 Function of KPDTAB, MNT. 01
DESCRIPTIVE QUESTIONS
1 What is macro-pre-processor? Explain steps of macro-pre-processor design. (June-2013) 07,07

System Programming (2150708) 2019 Page 15


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
(Dec-2015)
2 Define a macro taking starting_location and N as parameters to find summation of all N 04
numbers stored at locations starting from starting_location. The result is to be stored at
starting_location. (Jan-2013)
3 List and explain tasks involved in macro expansion (Jan-2013) 07,03
What are the basic tasks that must be performed by macro pre-processor? (Nov-2016)

4 Write a macro that moves n numbers from the first operand to the second operand, where n 04
is specified as third operand of the macro. (May-2011)
5 Explain design specification tasks for macro pre-processor with suitable Example. (May- 07
2011)
6 Describe tasks and data structures considered for the design of a macro pre-processor. (Dec- 07
2011)
7 Explain Design of Macro Pre-processor. (May-2012)(May-2017) 07,07
8 What is macro in programming language? Write an algorithm for macro definition. (May- 07
2012)
9 Draw a flow chart and explain simple one pass macro processor. (May-2012) (May-2016) 07,07

10 Discuss parameters for Activation Records. (May-2012) 07


11 Explain various data structures of Macro definition processing with example. (Dec-2013) 07

12 Explain use and field of following tables of macro. 07,07,07


KPDTAB, MDT, EVTAB, SSTAB (May-2016) (May-2018) (Jun-2019)
13 Explain following terms with suitable example.(Nov-2017) 07
(1) Expansion time variable (3) Semanticexpansion
(2) Positional parameter (4) MacroPre-processor
14 Explain in brief design of a macro assembler. (Oct-2016)(May-2017) 07,07
15 Compare and contrast macro pre-processor and macro assembler.(Oct-2016)(May- 04,04
2017)
16 By taking the example of factorial program explain how activation record will look like for 07
every recursive in case of factorial (3).(May-2018)
17 Explain following terms with suitable example. (May-2018) 03
1. Expansion time variable 2. Positional parameter

18 Define Macro - preprocessor. Explain steps of Macro Preprocessor Design.(Jun-2019) 04

CHAPTER 5 – Linkers and Loaders


TOPIC 1:Introduction
SHORTQUESTIONS
1 Define: Linker 01
2 Define: Loader 01
DESCRIPTIVEQUESTIONS
1 Explain the concept of linker and loader. 07
2 Draw flow chart of “program linking”. (Dec-2013) 07
3 Define the following terms: (Nov-2017) 07
1) Translation time address: 2) Linked time address 3) Load time address: 4)
Translated origin: 5) Linked origin: 6) Load origin: 7) Interpreter
DESCRIPTIVEQUESTIONS
1 Describe in detail how relocation and linking is performed. (May-2011) 07
2 Explain program relocation with example. (May-2014) 07

System Programming (2150708) 2019 Page 16


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
3 What is program relocation? How relocation is performed by linker. Explain with example. 07,07,03
(Dec-2014) (May-2016)
What is program relocation? How relocation is performed by linker?(May-2017)
4 Explain object module of the program. (Dec-2013) 03
5 Explain object module of a program unit P in linker. (Nov-2016) 04
6 Which are the methods used for identifying free memory area? (Nov-2018) 04
7 Differentiate Linker and Loader.(Jun-2019) 03
TOPIC 3:Design of a Linker
SHORTQUESTIONS
1 A program that links several programs iscalled_ . 01
DESCRIPTIVEQUESTIONS
1 Explain relocation and linking requirements in segmented addressing with suitable example. 07
(June-2013)
2 Explain design of a linker by addressing issues of relocation and linking. (Jan-2013)(Oct- 07,07,07
2016)
Explain in brief design of a linker. (May-2017)
3 What is program relocation? How relocation is performed by linker? Explain with example. 07
(Dec-2015) (May-2018)
4 Explain relocation with its algorithm and example. (May-2017) 07
5 Define program relocation. How address is corrected in address sensitive instructions in case of 07
program relocation.(Nov-2018)
6 Explain the term self-relocating program.(Jun-2019) 03
TOPIC 4:Self -Relocating Programs
SHORTQUESTIONS
1 A program which itself performs relocationiscalled . 01
DESCRIPTIVEQUESTIONS
1 Explain self relocating program and overlay structured program. (Jan-2013)(Nov-2017) 03,07,07
Explain in brief self relocating programs in detail.(Oct-2016)

2 What is program relocation? Explain characteristics of self-relocating programs. (Dec-2011) 07

TOPIC 5:Linking in MSDOS


DESCRIPTIVEQUESTIONS
1 Write a short note on MS-DOS Linker. (May-2011) (May-2014) 07,07
2 Write an algorithm for first pass of a linker. (Dec-2013) 07
3 Define linking. How external reference is resolved in linking? (Nov-2018) 04
TOPIC 6: Linking of Overlay Structured Programs
SHORTQUESTIONS
1 Define: Overlay. 01
DESCRIPTIVEQUESTIONS
1 What is Overlay? Explain the execution of an overlay structured program and its execution. 07,07,04
(Dec-2011)(May-2017)
Define overlay. Explain the execution of an overlay structured program.(Jun-2019)
2 What is overlay? Explain linking of overlay structured program. (May-2016) 07
3 What is an overlay? Explain overlay structured program and its execution (Dec-2011) 07

4 Explain dynamic linking. Draw the flaw chart for dynamic linking. (May-2012) 03
TOPIC 7: Loaders
SHORTQUESTIONS
System Programming (2150708) 2019 Page 17
Vadodra Institute of Engineering Semester: V (2019)
and&Technology
1 Define: Absolute loader 01
2 Define: Bootstrap loader 01
3 List various types of Loaders. 01
4 Function of Loader. 01
5 Difference between Linker & Loader. 01
DESCRIPTIVEQUESTIONS
1 Explain Loader. (Jan-2013) 07
2 Explain following terms: (1) Loaders (2) Self Relocating Programs. (June-2013) 07
3 Write a brief note on MS-DOS linking and loading. (May-2011) 07,07,07
Explain linking and loading in MS DOS. (May-2012)
Write a brief note on MS-DOS Linker.(Jun-2019)
4 In brief explain relocating loader. (May-2016) 07
5 Explain following: Loader (Jan-2013) 3.5
6 Explain bootstrap loader.(Nov-2016) 03
7 Explain the term loader with its basic function.(May-2018) 03
8 Explain absolute loader in detail.(Nov-2017) 04
9 Compare Absolute Loader with Relocating Loader (BSS Loader).(Jun-2019) 04
TOPIC 8: Compile-and-Go Loaders
DESCRIPTIVEQUESTIONS
1 Compare the compile and go loader and absolute loader. 07
TOPIC 9: Absolute Loaders
DESCRIPTIVEQUESTIONS
1 Explain Absolute Loader with example. (May-2012)(Dec-2015)(May-2016) 07,03,07,07
Explain absolute loader. (Nov-2016)
2 Write a short note on absolute loader. (Dec-2014) 07
CHAPTER 6 – Scanning and Parsing
TOPIC 1: Programming Language Grammars Classification
ofGrammar,Ambiguity in Grammatic Specification
SHORTQUESTIONS
1 State whether the following statements are true or false. Justify your answer. 01
Simple precedence grammar is a superset of Operator Precedence grammar. (Dec-2013)

2 Type-1 grammar is alsoknownas . 01


3 Type-2 grammar is alsoknownas . 01
4 Define: Pattern. (May-2017) 01
5 Define: Production 01
6 Define: Grammar 01
7 Define: Operator grammar 01
8 Define: Finite state automaton 01
9 1. Define the following terms: 04
i. Context freegrammar
ii. Regular grammar
iii. Context sensitivegrammar
iv. Type-0 grammar
10 Define: Ambiguity in grammar. 01
11 Write any Ambiguous grammar. 01
12 Write any complete grammar. 01
13 Write any Unambiguous grammar. 01

System Programming (2150708) 2019 Page 18


Vadodra Institute of Engineering Semester: V (2019)
14 and&Technology
How Ambiguity is removed from grammar? 01
15 Which tasks are performed during scanning? 01
15 Syntax tree is generated by Syntax Analysis Phase. 01
DESCRIPTIVEQUESTIONS
1 What is grammar? Explain types of grammar. Write an unambiguous grammar for an 07
arithmetic expression containing the operators ↑ (exponentiation), +,*.(Dec-2014)
2 List and explain various types of grammar.(May-2014) (Dec-2015) 04,07
3 Explain types of grammar. (Dec-2013) (May-2016) (May-2018) 03,03,04
TOPIC 2:Scanning
DESCRIPTIVEQUESTIONS
1 Construct DFA for following regular expression: (a* | b* )a*ab #. (Jan-2013) 04
2 Build a DFA for following regular expression. (a | b)*aab#. (June-2013) 03
3 Explain lexical analysis of a language processor. (Jan-2013)(May-2016)(May-2018) 05,03,03

4 Draw a DFA for the following Regular Expression. (a/b)* abb (Dec-2013) 04
5 Convert given regular expression to DFA. The expression is (a | b)*abb#. (May-2011) 05

6 Construct DFA for following regular expression: a* ( b* | c*) (a | c ) * # (Dec-2011) 07

7 Develop Regular expression and DFA for declaring a variable in „C‟ lang. (May-2012) 07

8 Write a regular expression for the language consisting of all strings ending with 1 and does 07
not contain substring 00. Convert the resultant regular expression into Deterministic Finite
Automata. (Dec-2014)
9 Write a regular expression for a language containing a binary string which does not contain 02
two consecutive 0s or two consecutive 1s anywhere. (Dec-2015)
10 Construct NFA and DFA for following regular expression: (0 | 1)*001# (Dec-2015) 07
11 Construct DFA for- 0*1*(0/1)# (Oct-2016) (May-2017) 03,07
12 Define regular expression and DFAs for following kinds of strings: 04
1. A real number with optional integer and fraction part.
2. A comment string in the C++ language. (Nov-2016)
13 Implement DFA from : a*(b* | c*)* b*d*# (May-2017) 07
14 Show that following regular expressions are equivalent by constructing optimized DFA. 07
(0/1)*
(0*/1*)* (May-2017)
15 Construct a deterministic finite automata for (0|1)*011.(Nov-2017) 04
16 Write Regular expression for all string end with „abb‟ and Construct equivalent DFA.(Jun- 04
2019)
TOPIC 3: Parsing, Top Down Parsing, Bottom up Parsing
SHORTQUESTIONS
1 Define the Parsing (June-2013) 01
2 Write regular expressions of a given language. The language consists of all strings of a’s and 02
b’s which ends with a and does not contain bb. (May-2011)
3 State whether the following statements are true or false. Justify your answer. To make top- 01
down parsing feasible, it is necessary to eliminate left-recursion. (Dec-2013)
4 Constants and literals are two names having the same meaning. State true or false. (Dec- 01
2013)
5 Define the following term: 01
Handle(Dec-2013)

System Programming (2150708) 2019 Page 19


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
6 Define Handle, Grammar. (Nov-2016) 01
7 How to avoid backtracking in top down parsing? (Nov-2016) 01
8 State true/false: Top down parsers can never work with left recursive grammar. (May-2017) 01

9 What Source String Marker(SSM) points to? 01


10 What “1” indicates in LL(1) parsing algorithm? 01
11 State true/false: Shift-reduce parsing is a bottom up parsing approach. 01
12 State true/false: LR parsing is a bottom up parsing approach. 01
13 Define: Left factoring. 01
14 Define: Left Recursion. 01
15 Which tasks are performed during parsing? 01
DESCRIPTIVEQUESTIONS
1 Write complete grammar for an arithmetic expression containing operators „+‟, „–„, „*‟, „$‟ 07
using recursive specification and Backus Naur Form (BNF) where „$‟ is exponentiation
operator. (June-2013)
2 Write unambiguous production rules (grammar) for arithmetic expression Containing +, - , *, 07
/ and ^ (exponentiation). Construct parse tree and abstract syntax tree for :<id>–<id> * <id>
^ <id> + <id>(Dec-2011)
3 Given a grammar, 07,07
ETA, A+TA |^
TVB B*VB
|^ Vid |(E)
Develop an LL(1) parser table and parse following string using the parsing table.
id * ( id + id). (May-2011) (May-2018)
4 Describe working of LL(1) parser and parse following string : 07
|- <id> * <id> * <id> + <id> -| (Dec-2011)
5 Explain Left recursion, Left factoring and backtracking in top down parsing. (May- 07,07
2012) (Nov-2016)
6 Explain working of LL (1) parser. Parse following string: id + id - (id * id ). (Jan-2013) 07

7 Perform left-fectoring on the following grammar 04


S=iEtSeS|iEtS|a
E=b
(Dec-2013)
8 Explain left factoring by giving example. (Jan-2013) 03
9 Remove left recursion from following production rules: 04
A -> AaB |x
B -> BCb |y
C -> Cc | epsilon (Jan-2013)
10 Parse following strings using given LL(1) parsing table (TABLE-I) 07
(i) id*id + id * id (ii) id + id + id +id

(June-2013)
11 By giving suitable example, illustrate working of operator precedence parser. (Jan-2013) 07
System Programming (2150708) 2019 Page 20
Vadodra Institute of Engineering Semester: V (2019)
and&Technology
12 Write algorithm for operator precedence parsing and explain with example. (Dec-2013) 07

13 Write operator precedence table for arithmetic operators “+”, “*”, “-”, “/” .Parse following 07,07,07
expression using the table. id * id + id * id. (June-2013)
Write operator precedence table for arithmetic operators “+”, “*”, “-”, “/” .Parse following
expression using the table. id * (id+id)/(id*id). (Nov-2016)
Implement operator precedence parsing for the string:
id +id*(id-id)/id (May-2017)
14 What is operator precedence parsing? Show operator precedence Matrix for following 07,07
operators:+, - , * , ( , ).Parse following string: |- <id> + <id> * <id> -| (Dec-2011) (May-
2018)
15 Explain recursive decent parser with suitable example. Also state its Drawbacks. (June- 07
2013)
16 Explain recursive descent parsing algorithm. (Dec-2013) (Dec-2015)(May-2016) 07,07,07
17 Explain recursive decent parser. 07
18 Write unambiguous production rules to produce arithmetic expression consisting of +, -, *, / , 07,07
^ (exponent), id. Use them for parsing id ^ id ^ id * id + id / id using shift -reduce parser
(Naïve bottom up parsing). Also lists limitation(s) of the method. (Jan-2013)(Dec-2011)

19 Compare top-down and bottom-up parser. (June-2013) 07


20 Given the grammer, perform the top-down parsing for the string +*35*45 07
E =+TE|E
T =*VT|V
V= 0|1|2|3|………|9 (May-2012)
21 Explain Left recursion, Left factoring and backtracking in top down parsing. (May-2012) 07,07

Explain left factoring with appropriate example. (Oct-2016)


22 Write regular definitions for producing real numbers of programming language „C. (Jan- 07
2013)
23 Consider following grammar S -> aSbS | bSaS | epsilon Derive the string abab. Draw 07
corresponding parse tree. Are these rules ambiguous? Justify. (Jan-2013)
24 A language consists of all strings of a‟s and b‟s which ends with b and does not contain aa. 07
Write regular expression for the language. (June-2013)
25 What is bottom up parser? Explain operator precedence parser. Let a grammar for a language 07
is EE+E | E*E | id. Check validity of followingstring using stack based operator
precedence parser. id * id + id * id (May-2011)
26 Given the Grammar, evaluate the string id-id*id using shift reduce parser. 07
E-> E – E
E -> E * E
E -> id (May-2012)
28 If the string a9b had been identified as identifier, but if in the further use 9ab is written, 03
which phase of compiler would identify as an error? How? (Nov-2018)
29 Perform lexical, syntax and semantic analysis on below C statement 07
a=b+c*d*100+e/f, Where data type of b, c & e are integers and remaining all variables are
float. (May-2014)
30 Define Simple Phrase and Handle. Using Handle and Simple Phrase trace the bottom up 07
parsing algorithm.
Grammar is :
E ->T+ E | T – E |T
T ->T *V | T / V |V

System Programming (2150708) 2019 Page 21


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
V->a | b | c | d
String is : a - b * c + d (May-2014)
31 When Left- factoring on a grammar is applied? Apply left- factoring on the below 07
given grammar and perform Predictive Parsing.
Grammar is
S ->i E t S | i E t S e S |
a E ->b
String is : i b t a e i b t a (May-2014)
32 List out the tasks performed by the analysis and synthesis phase of a “Simple 07
Assembly Language” (May-2014)
35 Explain left recursion and left factoring with suitable example. (Dec-2014) 07
36 Given a grammar 07
S→XS | dS |
ε X→Y | Zb
| aY Y→cZ
Z→e
Develop an LL(1) parsing table and check whether the string “dace” is accepted or not? (Dec-
2014)
37 What does “1” indicate in LL(1) parsing? Explain LL(1) parsing with example. (May- 07
2017)
38 Define followingterms: 07
1. SystemProgram
2. LanguageProcessor
3. Parsing
4. OperatorGrammar
5. Handle
6. Assembler
7. IndirectTriple
(Dec-2014)
39 Define: Ambiguous 07
grammar. Define: Pass of
assembler.
Consider following grammar:
S-> iCtSeS | iCtS
| a C->b
Check whether the given grammar is ambiguous or not. (Oct-2016)
40 Eliminate left recursion from following 04
grammar. S->A
A->Ad | Ae | aB |
aC B->bBC | f
C->g (Oct-2016)

System Programming (2150708) 2019 Page 22


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
41 Define: Operator precedence parser. 07
Apply operator precedence parser on: id*id+id-id*id (Oct-2016)
42 Develop an LL(1) parser table for the following grammar and parse the string using the parsing 07
table : (id*id)+(id*id)
E->TA
A->+TA | €
T->VB
B->*VB | €
V->id | (E) (Nov-2016)
43 Explain left recursion from following grammar. 03
S->A
A->Ad | Ae | aB | aC
B-> bBC | f
C->g (May-2017)
44 Construct LL(1) parsing table for following grammar. 04
S-> iC tSeS | iCtS |a
C->b (May-2017)
45 Explain types of grammar in detail. (May-2017) 03
46 Define: Ambiguous grammar. Also state example of same. (May-2017) 03
47 Explain Left recursion, Left factoring in top down parsing.(May-2018) 04
48 Define: L-Attributed definition in detail.(May-2018) 04
49 Write algorithm for practical approach of top down parsing.(Nov-2017) 07
50 Construct predictive parsing table for following grammar: 07
E->BA
A->&BA|€
B->true|false. (Nov-2017)
51 Construct an operator precedence matrix for the operators of a grammar for expressions 07
containing arithmetic, relational and Boolean operator. (Nov-2017)
52 Explain Naïve Bottom up parsing algorithm with example and also mention which problem 07
occurs during parsing.(Nov-2017)
53 Draw the expression tree for the string f+(x+y)*((a+b)/(c-d)) by their evaluation order and 07
mention register required label in each node.(Nov-2017)
54 Remove left recursion from following grammar.(Nov-2018) 03
A → Ac | Aad | bd | ε
55 Consider a grammar S → aa | aSa, How a top down backtracking parser can generate six 04
occurrences of a? (Nov-2018)
56 Construct an LL(1) parsing table for the following grammar.(Nov-2018) 07
S → aBDh
B →cC
C → bC | ε
D →EF
E→g|ε
F → f |ε
57 How a lexical analyzer recognizes unsigned numbers such as 12,12.3,12.3E4? (Nov- 04
2018)
58 Consider the following grammar for expressions 07
E → EAE | (E) | -E | id
A → + | - | * | / | ^ where ^ represents exponent. Generate operator precedence relation
matrix and show how id * id ^ id will be parsed? (Nov-2018)
59 What is ambiguity in grammatic specification? (Nov-2018) 03
60 (i) Write unambiguous production rules to produce arithmetic expression consisting of +, *, 07

System Programming (2150708) 2019 Page 23


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
( , ), id.
(ii) Remove left recursion from that unambiguous production rules and generate LL(1)
parsing table for that grammar.(Jun-2019)
61 (i) Define Operator precedence grammar. Convert following production rules ofgrammar 07
into suitable Operator precedence grammar.(Jun-2019)
E → EAE | id
A→-|*
(ii) Generate operator precedence relation matrix for converted Operatorprecedence
grammar. Show how id - id * id will be parsed using Operator PrecedenceMatrix.
62 Given the Grammar, evaluate the string id - id * id using shift reduce parser.(Jun- 04
2019)
E-> E – E
E -> E * E
E -> id
TOPIC 4: Language Processor Development Tools: LEX, YACC
SHORTQUESTIONS
1 Define Lexical and Semantic Expansion. (Dec-2013) 01
2 What is YACC? 01
3 What is LEX? 01
DESCRIPTIVEQUESTIONS
1 Explain LEX in detail. 07
2 Explain YACC in detail. 07
3 What is the structure of LEX program? (Nov-2018) 04
CHAPTER 7 – Compilers
TOPIC 1:Introduction, Causes of Large Semantic Gap,Binding
andBinding Times
SHORTQUESTIONS
1 State whether the following statements are true or false. Justify your answer. An interpreter 01
is a language translator. (Dec-2013)
2 Explain the Interpreter. (May-2011) 01
3 is an association of attribute of program entity with some value. 01
What do you mean by memory allocation? 01

Define: Static memory Allocation.


Define: Dynamic memory Allocation.
Difference between Static & Dynamic memory Allocation. Which one is better? Why?
Define: Static memory Allocation.
DESCRIPTIVEQUESTIONS
1 Give example(s) of errors detected by first three phases of compiler. (Jan-2013) 03
2 Explain the Phases of Compiler. (May-2011) 07
3 Compare one pass and two pass compilers. Explain various parameter passing mechanisms 07
for functions. (Dec-2011)
4 What is difference between compiler and Interpreter? 07
5 Consider the statement a=b+c*10.where a, b, c are of type float. Show the translation of the given 07
statement by different phases of compiler to produce assembly language statement. (Dec-2014)

6 Explain the terms Binding and Binding Times.(May-2018) 04

TOPIC 2: Data Structure used in Compiling, Scope Rules


System Programming (2150708) 2019 Page 24
Vadodra Institute of Engineering Semester: V (2019)
and&Technology
SHORTQUESTIONS
1 Give the names of data structures used in compiler. (Nov-2016) 01
DESCRIPTIVE QUESTIONS
1 Write Three address codes and triple representation for x = x * y * z + x * y + y * z (Jan- 04
2013)
2 Given following expression, x = - a * b + - a * b 07
(i) Write three address codes for theexpression.
(ii) Optimize the three address code if it is possible to doso.
(iii) Give triple implementation for the three address code of the expression. (May-
2011)
3 Show quadruple table for local optimization using valuenumbers 03
14 g=25.2
15 x=z+2
16 h=x*y+d
: ……..
34 w=x*y (Dec-2013)
4 Explain methods for accessing non local variables. (Dec-2013) 03
5 How compiler implements scope rules? (Nov-2016) 03
6 Explain use of value number in local optimization.(Nov-2017) 03
TOPIC 3: Memory Allocation, Compilation of Expression, Compilation
ofcontrol structure
SHORTQUESTIONS
1 Define term indirect triple. 01
2 Define term control structure. 01
3 State a primary difference between call by value and call by reference as a parameter passing 01
mechanism.
4 Define: Triple. 01
5 Define: Quadruple. 01
6 Define: Frequency Reduction. 01
7 Define: Pass. 01
8 Define: Phase. 01
9 Define relative and absolute expression. 01
10 What is difference between compiler and Interpreter? 01
11 List various memory models. 01
12 Define: Static memory Allocation. 01
13 Define: Dynamic memory Allocation. 01
14 Difference between Static & Dynamic memory Allocation. Which one is better? Why? 01
Define: Static memory Allocation.
DESCRIPTIVE QUESTIONS
1 List and compare various techniques for dynamic memory allocation. (Jan-2013) 04
2 Explain memory allocation in block structured language. (May-2011) (May-2018) 03,03
3 Explain Memory allocation models (Dec-2013) 04
4 What is static and dynamic memory allocation? 07
5 What is static and dynamic pointer in compiler? Explain working of display with suitable 07
example. (Nov-2016)
6 Explain in detail how the following input gets processed in toy compiler. 07
int a;
real b,c;
c=a+b*0.6; (Nov-2016)
System Programming (2150708) 2019 Page 25
Vadodra Institute of Engineering Semester: V (2019)
and&Technology
7 Explain quadruple, triple and indirect triple with example. (May-2017) 07,03,07
Explain working of triple, quadruples and indirect triples with example.(Nov-2017)
Explain triple, quadruple and indirect triples representation with example. (Jun-2019)

8 Explain triple and quadruple representation with example. (May-2012) (Oct-2016) (May- 07,07,04
2018)
9 Generate quadruple, triple and indirect triple for following expression: 07
ans=a+b*c/2.0 (May-2017)
10 Which data structure is used for automatic dynamic allocation and memory access? 04
Explain with suitable example. (Nov-2017)
11 Explain operand descriptor and register descriptor for a*b.(Nov-2017) 03
12 Given following expression = - (a+b) *(c+d) + (a+b+c) 07
1. Draw a Syntax tree for theexpression
2. Write a three-address code for theexpression
3. Give triple representation for the three address code of the expression (May-2014)

13 What is memory binding? Explain dynamic memory allocation using extended stack 07
model.(Nov-2018)
TOPIC 4: Code Optimization, Code Generation
SHORTQUESTIONS
1 Define the following terms. 02
1) Frequency reduction 2) triples (Dec-2013)
2 State true/false: Code optimization phase is an optional phase of compiler. (May-2017) 01

3 What is the need for code optimization? 01


4 What do you mean by Optimization of code? 01

DESCRIPTIVE QUESTIONS
1 Explain various optimizing transformations of a compiler by giving suitable examples. (Jan- 07
2013)(Dec-2015)
2 What are the issues in code generation in relation to compilation of expression? Explain each 07
issue in brief. (June-2013)
3 Describe various optimizing transformations commonly used in compilers. (Dec-2011) 07

4 What is meant by optimizing transformations? Explain any three with suitable example. 07
(June-2013)
5 Explain various steps of code optimization with example. (May-2012) 07
6 Explain different code optimization techniques. (Dec-2013)(May-2017) 07,07
7 What is the need for code optimization? 07
8 What is code optimization? Explain with example various optimizing transformations. (Dec- 07
2014)
9 Given following expression: x = -a * b + -a * b 07
(1) Write three address codes for theexpression.
(2) Optimize the three address code if it is possible to doso.
(3) Give triple implementation for the three address code of the expression. (May-2016)

10 Explain peephole optimization in detail. (Oct-2016) 07


11 What is peephole optimization? Explain any two optimization transformation in detail. (May- 03
2017)
12 Explain any three Code Optimization Techniques.(May-2018) 03

System Programming (2150708) 2019 Page 26


Vadodra Institute of Engineering Semester: V (2019)
and&Technology
13 Justify “Postfix string is a popular intermediate code in non optimizing compilers”.(Nov- 03
2018)
14 A program computes i*5 for 10 times. What type of optimization can be applied? (Nov- 03
2018)
15 Explain common sub expression elimination using value numbers.(Nov-2018) 07
16 Write a code fragment to find out whether number is odd or even. Draw control flow graph. 07
Perform control flow analysis.(Nov-2018)
17 List out various Code Optimization techniques used in Compiler. Explain any three 07
technique with suitable example.(Jun-2019)
CHAPTER 8 – Interpreters and Debuggers
TOPIC 1: Benefits of Interpretation, Overview of Interpretation
SHORT QUESTIONS
1 What do you mean by Interpreter. 01
2 State a primary difference between compiler and interpreter. 01
3 Functions of Interpreter.
DESCRIPTIVEQUESTIONS
1 Comparison between Compilers and Interpreter. 07,03
Differentiate Compiler and Interpreter.(Jun-2019)
2 Compare the performance of Compilers and Interpreters. 07
3 Advantages of Interpreters. 04
4 What is interpreter? Explain benefits of interpreter. Compare interpreter and compiler. (Dec- 07
2015)
5 What is interpreter? Explain pure & impure interpreters. (May-2016) 07,03,03
What is pure and impure interpreter?(Nov-2016)
Explain pure and impureinterpreter.(Nov-2017)
6 Explain functioning of interpreter. (Dec-2013) 04
7 What is interpreter? Explain pure & impure interpreters. (May-2018) 07
8 Describe three components of the interpreter.(Nov-2018) 03
TOPIC 2: The Java Language Environment, Java Virtual Machine
SHORT QUESTIONS
1 What is JVM. 01
2 What is JIT? (Nov-2016) 01
3 What is JRE. 01
4 Define: Java bytecode 01
DESCRIPTIVE QUESTIONS
1 Explain the java compiler: javac. 04
2 Explain different approaches of java compilation. 04
TOPIC 3: Types of Errors
DESCRIPTIVEQUESTIONS
1 Explain Types of Error?[VIER] 04
TOPIC 4: Debugging Procedures, Classification of Debuggers
SHORT QUESTIONS
1 What do you mean by Debugging? 01
2 Difference between Interpreter & Debugger. 01
3 Functions of Debugger. 01
DESCRIPTIVEQUESTIONS
1 Explain Classification of Debugging. 04
2 What is debug monitor? 04
System Programming (2150708) 2019 Page 27
Vadodra Institute of Engineering Semester: V (2019)
and&Technology
3 Explain design of an editor. (Nov-2016) 04
4 Describe the facilities for dynamic debugging. (Nov-2018) 04

System Programming (2150708) 2019 Page 28

Вам также может понравиться