Download GTU BE/B.Tech 2018 Winter 5th Sem New 2150708 System Programming Question Paper

Download GTU (Gujarat Technological University) BE/BTech (Bachelor of Engineering / Bachelor of Technology) 2018 Winter 5th Sem New 2150708 System Programming Previous Question Paper

www.FirstRanker.com
1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ?V (NEW) EXAMINATION ? WINTER 2018
Subject Code:2150708 Date:20/11/2018

Subject Name:System Programming

Time: 10:30 AM TO 01:00 PM Total Marks: 70

Instructions:

1. Attempt all questions.

2. Make suitable assumptions wherever necessary.

3. Figures to the right indicate full marks.

MARKS

Q.1 (a) Remove left recursion from following grammar
A ? Ac | Aad | bd | ?
03
(b) Consider a grammar S ? aa | aSa, How a top down backtracking
parser can generate six occurrences of a?
04
(c) Construct an LL(1) parsing table for the following grammar.
S ? aBDh
B ? cC
C ? bC | ?
D ? EF
E ? g | ?
F ? f | ?
07

Q.2 (a) If the string a9b had been identified as identifier, but if in the
further use 9ab is written, which phase of compiler would
identify as an error? How?
03
(b) How a lexical analyzer recognizes unsigned numbers such as
12,12.3,12.3E4?
04
(c) Consider the assembly program fragment
START 200
READ A
LOOP MOVER AREG,A
SUB AREG,=?1?
BC GT,LOOP
STOP
A DS 1
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?
07
OR
(c) Consider the assembly program fragment,
MOVER CREG, B
ADD CREG, =?1?
BC ANY,NEXT
LTORG
=?5?
=?1?
SUB AREG,=?1?
END
=?1?
(i) Explain LTORG directive.
07
www.FirstRanker.com www.FirstRanker.com
www.FirstRanker.com
FirstRanker.com - FirstRanker's Choice
www.FirstRanker.com
1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ?V (NEW) EXAMINATION ? WINTER 2018
Subject Code:2150708 Date:20/11/2018

Subject Name:System Programming

Time: 10:30 AM TO 01:00 PM Total Marks: 70

Instructions:

1. Attempt all questions.

2. Make suitable assumptions wherever necessary.

3. Figures to the right indicate full marks.

MARKS

Q.1 (a) Remove left recursion from following grammar
A ? Ac | Aad | bd | ?
03
(b) Consider a grammar S ? aa | aSa, How a top down backtracking
parser can generate six occurrences of a?
04
(c) Construct an LL(1) parsing table for the following grammar.
S ? aBDh
B ? cC
C ? bC | ?
D ? EF
E ? g | ?
F ? f | ?
07

Q.2 (a) If the string a9b had been identified as identifier, but if in the
further use 9ab is written, which phase of compiler would
identify as an error? How?
03
(b) How a lexical analyzer recognizes unsigned numbers such as
12,12.3,12.3E4?
04
(c) Consider the assembly program fragment
START 200
READ A
LOOP MOVER AREG,A
SUB AREG,=?1?
BC GT,LOOP
STOP
A DS 1
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?
07
OR
(c) Consider the assembly program fragment,
MOVER CREG, B
ADD CREG, =?1?
BC ANY,NEXT
LTORG
=?5?
=?1?
SUB AREG,=?1?
END
=?1?
(i) Explain LTORG directive.
07
www.FirstRanker.com www.FirstRanker.com
www.FirstRanker.com
www.FirstRanker.com
2
(ii) Explain the entries in mnemonic opcodes table as per
above code fragement.
(iii) How table of literals will be manipulated?
Q.3 (a) Which type of gap makes the software buggy or unreliable?
Which methods can be used to overcome this situation?

03
(b) How the use of programming language can help in making the
software reliable?
04
(c) Write Macro definition with following and explain.
(i) Macro using expansion time loop
(ii) Macro with REPT statment
07
OR
Q.3 (a) Write Macro definition for adding two numbers that uses
positional and keyword parameters.

03
(b) Write a macro definition for adding two numbers 10 times. Use
nested macro call to increment numbers by 1 every time in 10
iterations.
04
(c) Consider the following grammar for expressions
E ? EAE | (E) | -E | id
A ? + | - | * | / | ^ where ^ represents exponent. Generate operator
precedence relation matrix and show how id * id ^ id will be
parsed?
07
Q.4 (a) Justify ?Postfix string is a popular intermediate code in non
optimizing compilers?
03
(b) Which are the methods used for identifying free memory area? 04
(c) Define program relocation. How address is corrected in address
sensitive instructions in case of program relocation.
07
OR
Q.4 (a) A program computes i*5 for 10 times. What type of optimization
can be applied?
03
(b) What is the structure of LEX program? 04
(c) Explain common sub expression elimination using value
numbers.
07
Q.5 (a) What is ambiguity in grammatic specification? 03
(b) Describe the facilities for dynamic debugging. 04
(c) Write a code fragment to find out whether number is odd or even.
Draw control flow graph. Perform control flow analysis.
07
OR

Q.5 (a) Describe three components of the interpreter. 03
(b) Define linking. How external reference is resolved in linking? 04
(c) What is memory binding? Explain dynamic memory allocation
using extended stack model.
07


*************
www.FirstRanker.com www.FirstRanker.com
www.FirstRanker.com
FirstRanker.com - FirstRanker's Choice

This post was last modified on 20 February 2020