System Programming Qpaper 2024
System Programming Qpaper 2024
Semester V
2. Section A is compulsory.
Section A
/ ,/;ff: ·
· ) Wh1c h p J1a se o f a comp1· 1e r perform s type
checking? ( l)
P.T.O.
2
4431
# -at _is th e differe nce betwee n static and shared
Iibranes ? (2)
(2 )
(i) ocoI1) *o
(ii) ((011)*0(011)(011))
a + a* (b - c) + (b - c) * d
. e an exampl e of
int[2][3][4] (3)
X = f(y + 1) + 4 (4)
P.T.O.
4
4431
·t machi ne code for the following th ree add
Wrt e ress
. .
instruction . (4)
if x < y goto L
S ➔ ACBjCbbjBa
A ➔ dajBC
B ➔ gj E
C ➔ hi E
Sectio n B
ACTION GOTO
State a b 0 l $ s A B
0 Sl S2 S3 11 4 5
l S1 S2 S3 6 7
2 r4 r4 r4
3 r6 r6 r6 r6 r6
4 rl rl rl r1
5 r2 r2 r2 r2 r2
6 S8
7 S9
8 r3
9 S10 \
10 r5
. r5
11 ) ace
Gramma r :
s ➔ A
s ➔ B
A ➔ aAb
A ➔ 0
B ➔ 1
B ➔ aBbb
0 ~
y..
Show that the following grammar is not SLR(!):
(6)
S ➔ Aa\bAc\dc \bda
A ➔ d
P.T .O.
4431 6
for( i I ; i ,,, IO ; i + 1- )
" Ii I X * 5 ,·
I
I
4431 7
a = O·
'
else
b = O·
'
1
i
· ~
~ 1 at is an activat ion record? Explain the d_ata
i:•e ms that might appear in a genera l act1vat1on
record . (5)
s ➔ SSIAB
f
A ➔ Aaja
(5)
8 ➔ Bblb
~
tori al of a given
F
A C langua ge code to compute ac ~
. ())
· I
beow ·
numbe r recursi vely 1s s hown
P.T.0 .
J
8
4431
j 11 t faC t O ri a I ( i 11 t 11 )
if(n == 0)
return 1;
else
1 e: a.ob''1
F'l
Name Size Alb?D
.text 200 16
.data 60 4
.data I 75 4
l e: b .0b'1
F'l
Name Size Alien
.text 100 16
.data 155 4
.data2 300 4
t
t >