You are on page 1of 15

d te

M ı rm Ex a m ı
n a tı
o n O d d Se m e s te r 20 17

F irs t Y e a r, B a tc h 2 0 1 ?
cs w tÆ a m e n ta ı
s d ę t ņ g j ņ e g

X Ex a m ı
n e
ı
r s Sı
gn

Q 1 U se T r u t h ta b le a p p r o a c h t o p ro ve th a t A + B ・ i i [D E M o rg a n s
'
T he o re m ]
m m ı lĦ lm là iļ

嚣鱸荟

Q 3 P e r fo rm 5 4 7 )a + 6 7 4 )a (S h o w in t e d ia te
rm e s te p s in O c ta ln u m be r s y s te m )

蘇婪公 二

。 ,


で 。

-
Ï

Scanned by CamScanner
X ľ .
'
. ' ' " , o f co m p u te rs

4 A ř ñ ic r o p r o c e s s o r ba se d ATM m a c h in e is a n e xa m p le o f ,

v ip u r p o s e
w e c io p te i) g e n e r a l p u r p o s e c o m p u te r
co m u
, p
e rs o n a l c o m
p u te r , it is n o t 0 c o m
p u te r
5 G e n e ra lly s p e a k in g , it is t h e m o s t p o w e r fu l i
m c ro c o m
p u te r
p e rs o n o lC o p u te PD A
m r,
,
m a in fr a m e , polmtop\Norkstatiori
In th e s e s y s te m s , p ro g ra
ť
m s a re d iv id e d o u t to a n u m be r o f s ta n d a rd in e x pe n s iv e
s im u lta n e o u s ly p ro c e s s o rs
,
w h ic h w o

v e c to r p ro c e s s o r s m a in
, fr a m e s, úİ i o s s iv e ly p o ra lle ip r o c e s s o r s) w o r k
s t a t io n s
v o n N e u m
'
a n n s co n ce
p t t h a t is s t ill b e in
g u se d,
o lw in e s to r a g e o fp ro g ra m s, in c /u s io n o fca c he W d p r o g ro
o r a s y s te m
w ith ı
, re m co n ce pı u s e o f s e m ic o n d u c to r m
e s se r RA M em o r ie s
ca p a c it y , fo llo w in g p r o b le m
(s ) m ig h t o ccu r
spe e d o f p r o c e s s in g is c o m p ro m is e d s w a p p in g o fp r o g ra m
,
s Jr o m se co n d a ry s t o r a g e to M o i
s y s te m ho n gs u lıo f t h e n m em o r
p, o a bo h
Į
ve ,
n o n e o f th e a bo v e
Hu A
t ìs t h
ēxþ
äiiśīön b u s th a t su p p o r t s ta s it ic Ié
ı
SA U SB n fr o
ı re d p o rt
ā ħđ
ìhrëMiiiiēńśiõi\aiT3Ďraph, cs t r a n s m is s io n

r in te r ca n be c o n n e c te d w it h it , fo r e ffic ie n td a t a t r a n s m is s i
o n
s e r ia l Port[Pûolieĺ poscsl p o r t ,
in fr a re d p o rt
11 A s p e c ia l p u rp o se c o m p u te th a t c a n p e
r r fo r m m a th e m a t ic a ı
ıy in t e n s iv e t a s k s r e la t e d t
o 3 D
CPU A RM g r a p h ic s a p p ı
ic a t io n s
, p ro c e ss o r
,
PO W ER pC

P e r io d ic re fr e s h in g c ir c u it r y is n e e de d it h t h e
w s e m e m o ry c h ip s

F ilıin t h e b la n ks
[9 ]
a lw a ys m e a s u re d in 些壁上 F 门김彗( \口 。 \ ;
얩 p ° in 누 w e ta b 》八
pu 5 e Ļ
ca p a c it y & p ro c e s s o r s
'
s pe e d a re th re e a in
m w a y s fo e a s u r in
r rr ı g po w e r o f a pe rs o n a l
co m p u te r

Co n \ï ū \ u r \ţ is re s po n s ib le fo r g u id in g t h e re s t o f th e fo
co m p u te r r p ro p e r e xe c u t io n o f in s t r u c t io n s

C a ç is (a r e ) c o n s id e r e d a s t h e fa s t e s t m e m o ry o fa co m p te
u r

5 A n in s t r u c t io n is a ı y s fe t c h e d in m gı b e fo r e s t a r t in
w a re s te r g its e xe c u t io n

A co m p u te r w it h 1 6 b it d a

Scanned by CamScanner
u r in g a re a d o p e r a t io n f in fo
,
s o u rc e o rm a t io n t o b e r e t r ie ve d fr o m M M is aı
w a y s p la c e d o n ı
in e s

A m a ļi
n m LĹ\e is t h e s h o r te s t in t e rv a l in w h ic h a n e ı
e m e n t a ry o pe ra t io n ca n ta k e p la ce w it h in th e

ł
p ro c e sso r

v 9 Fo r a p ro c e s s o r w o r k in g o n 4 0 G H z s pe e d, c lo c k c y c ı
e w id t h se c

Ló A
& is in fo rm a t io n s p e c ia lis t w h o p e r fo rm s s y s te m a n a ly s is , d e s ig n a n d Im p ı
e m e n t a t io n

1 T m ) is t h e d e v ic e re s po n s ib le fo r A c to D c c o n v e r s io n to ru n t h e c o m p u t e r d ir e c t ly Fr o m s ta n d a rd w a ll

\
1 2 D u e to b cL u cw a td co m p a t ib ilit y is s u e ,
c o re i7 p r o c e sso r is so m e t im e s u n a b le t o ru n a ppı
ic a t io n s

o r ig in a lly w r itt e n fo r a Pe n t iu m m a c h in e

(S IM
'
4 3 A pC h a v in g S in g le In lin e M e m o ry M o d u le M ) w it h 9 RA M c h ip s , th e n in th c h ip Is o fte n u se d fo r
U
( Į ÝO p c he c k in g

C la h is d lid s ta te d e v ic e fo
4 s ţn e w o f
3 u se a s so r so m e p o r ta b ı
e co m p u te rs

15 ı t ile v
ı e lc a c he s y s te m t h e c a c h e , w h ic h is a p a r t o f t h e p r o c e s s o r ' s c h i is a ls o c a lle d L
n a m u p ı

m e a n s, n d e v ic e s a r e c o n n e c te d in s e r ie s s o t h a t d a t a fo r t h e la s t d e v ic e h a s to g o t h r o u g h

a rc h ite c t u re ,
tw o o r m o re p ro c e s s o rs w o rk to g e th e r o n th e sa m e c h ip

c h ip s a re e ra s e d w it h a n e x po s u re to th e u ı
tra v io le t lig h t fo r c e r ta n i m in u t e s

Scanned by CamScanner
FC E u iz 2 (S e
st
C IS ) T im 20 ı
q c A & B 1 Ye m n

Į
a r :

Ro ı
ıN o : ß OD Ų N a m e : t M M g ElM

= T
&

- c u ĺ s .

ællı m ļ W LQ Ó ? hoo a

u
2 D e fin e fo llö w in g te rm s [3 ]
: Į
p ro c e s s :

/
'

扣 し 纽 化t m 回国園 空上 卫 鱼幺 (

@ m m a?n m a n o Ðn t i aū m
m e n ta t i
į
s h øn Ļ
J
? q ď a

\ is t h e p a r t ic u la r p ro c e sso r m o d e la n d o pe ra t in g s y s t e m o n w h ic h " " p u te r s y s te m is b a se d

Ħ in
'
in t o D u tp r s m m e m o rv
is t h e p f lo d in g a n o n e ra t in g s v s te m a co m
¢o o \ \
ro c e s s o a
#
h a v in g g e s t u d r iv e u se r in te r fa ce
is a n e x a m pı
e o fga m in g c o n s o le re n o

\y t h a ¢m
} is
in g e n v ir o n m e n t , o n u ch spa ce
m u lt ip r o g ra m m

a llo ca te d to p ro g ra m ,
a s n e e de d

ĥv à '",' " ' " ? m p


hv n n p ııç p r r n n r ıI ' "
u \ü ta s ' " " " m , ・ n f t \u n n r m n rp p m y Ħm s

co m p u te r w it h o de ce n tr a l p r o c e s s o r

c e s s o rs !ip k e d to g e th e r to
b y tw o r m o re co m p u te rs o r p ro
is t h e p r o c e s s in g do n e o

r fo r m w o r Esimultaneously
fro b e in g d a m age d b y in s u ffic ie n t p o w e r
is a d e v ic e t h a t p r o te c ts a co m p u te r m

dla ta as c h a rg e o n ca p a c ito rs
de ith s t h a t s to
lı re
m e m o r ie s a re m a w ce T>

W A m
" " " e m iM a ' " gm phi s
. " ? " " ' " " M ? o '
. "

Đ
e

#

v

Scanned by CamScanner
N E D U M V E R S IT Y O F E N G I N E E R I N G & T E C H N O L O G Y
F IR S T Y E A R S P R IN G S E M E S T E R (C O M P U T E R & I N F O R M A T IO
N SY S rE M S/
C O M P U T E R S Y S T E M S E N G IN E E R IN G )
E X A M IN A J ıO N 2 0 1 7
B A T C H 2 0 1 6 17 & P R 】 E V I O U S B A T C I ŁE S
T im e 2 H o u r s ı5 M in u te s D a te d 2 4 0 4 2 0 1 7
M a x M a r ks 40

* ıic ııx im e n t a Æ o f
ı @ Ðm e u t e ßr n g w c e r in g lıh h ?

(S i e c t i v e P a r t)

In s tr u c tio n s 1 C a lc u la t o rs a r e N O T a llo w e d
2 A t te m pt a ll q u e s tio n s

Qu e s t io n # 0 2 [8 m a r k s ]
fa ) P e r fo r m 2 3 6 4 1s + 6 2 3 7 1o Sh o w a ll t h e in t e r m e d ia t e s te p s in o c ta ln u m b e r s y s te m

(b ) U s e 2 p le m i g 6 b its
'
s co m e n t m e th o d t o p e r fo r m 1 8 31 o 2 2 3ıo u s n

(c ) D ra w a lo g ic d ia g r a m fo r g iv e n lo g ic ex p re s s io n u s in g a s o g ic g a t e s
fe w ı a s p o ss ib le A ls o lin d

v a lu e o F F if a ll th
,
e th re e in p u t s a re k e p t H IG H Sh o w in t e rm e d ia t e s te p s n e e ded to fin d th e v a Ju e

o FF

a t d o y o u u n d e r s ta n d by th e te r m V e c to r p r o c e s s o r s ?

18 m a r ı
{ s J

M M ? W r it e do w n t h e s t e p s t h a t a r e b e in g p e r fo rm e d

ĥ at d a ta p r e s s io tility is d t e r ? G iv e a t le a s t tw o
!d ) F o r w p u rp o s e a co m n u u se o n a co m p u
j -

e x a m p le s o fsu ch u t ility pro gra m



Qu e s t io n # 0 4 [8 m a r k s ]
( fly d is c u ss a c t iv it ie s w h ic h a re c a r r ie d o u t d u r in g S y s te m lm p le m e n ta t fo n pha se o f

S o ftw a re D e v e lo pm e n t L ife C y c le

te a n a g o r it h m
ı t o ta k e a p o it iv in t e g e r in p u t a n d c a lc u la t e & d is p la y it s fa c to r ia l
s e
qs

/
Į iefly d e s c r ib e w hat e x a c t ly ha pp e n s d u r in g fe t c h c y c le ,
deco de c y c le & e x e c u te c y c le ,

d
\ th e p r o c e s s in g o f g iv e n C+ + s t a te m e n t . ・ b + ç

(d ) D iffe r e n t ia t e b e tw e e n S y n c h r o n o u s D RA M & D o u b le D a ta R a t e S y n c h r o n o u s D R A M

Q ・e s t io n +¢0 5 [a m a r lcs J

:
【p ,v e a n y tw o d tffe r e lic e s b e tw . En an , ie ld e
u n sł d t w is te d p a ir c. b le & c o a x ia l ca b le A ls o

d ra ' " o p e r ly la b e le d d i. G r ' " fe n d . Ie w o Fa c o a x ia l c a b le

Fo r h a t p u r p o s e fo llo w in g n e tw o r k lin k in g d e v ic e s a re u s e d?
m w

P a ge 1 ' "


Ħ
Scanned by CamScanner
# R o u te r . N e tw o r k In te r fa ce C a rd
/ (c ) L is t d o w n tw o a dv a n t a g e s o f h a v in
g p e e r t o p e e r n e tw o r k
A sm a ll r e g io l o ffic e fa
n a o co m pa n y ha s to be s t a r te d w ith le s s th a n 2 5 ce n tr a lly m o n ito d
re
co m p u t e r s T h e e n v ir o n m e n t o f t h e c o m p a n y is q u ie t & p e a c e fu l T he n a t u r e o f th e ta s k is s u c h
t h a t tr a n s m is s io n r a te be
c a n c o m pro m is e d to m e e t th e lim it e d b u d g e t c o n s t r a in ts Co m pa ny
p re fe r s to c o n n e c t e a c h te rm in a l w it h th e ce n tr a l s e rv e r to e n s u r e a ln
n o p e r a tio n a e tw o r ]t , e v e n
w ith fe w lin k s in d o w n s ta te

N o w a n s w e r th e fo llo w in g q u e s t io n s

i W h ic h fu t io n a l r e la t io h ip ho ld
n c n s s u e x is t b e tw e e n v a r io u s n o de f th e
s o n e tw o rk?

ii W h ic h ca b le s ho u ld b e d to in te r c o
u se n n e ct c ó m p u te rs ?
iii W h ic h n e tw o r k to lo g y ld b e tte
p o w o u r m t t h e r e q u ir e m e n t o f th e c o m
e e
pa n y?
iv Co n s id e r in g th e g e o g r a p h ic a rea co v ere d b y th e n e tw o r k , w h ic h n e tw o r k ty p e it c a n b e

co n s id e r e d a s ?

Q u e s t io n # 0 6 [8 ]n a r k s ]
(a ) C o n s id e r T a b le 1 & w r it e a pp ro p r ia t e S Q L q u e r y to

i D is p la y a ll th o se P ro d u c t iD ,
P ro d u c tN a m e ,
P r ic e & Qu a n tity fr o m ta b le s O r d e r D e ta iı
s &

P ro du c ts w he re P r ic e is a b o v e 50

ii D is p la y a ll t h o s e re c o r d s fr o m ta b le E m p lo y e e s w h e re D e p tN a m e is o th e r th a n F in a n ce o r

M a n a ge rN a m e b e g in s w it h a lp h a b e t S

T a b le N a m e A t tr ib u te s

O r de rD e t a iliD * O r d e r lD
, ,
.

i p ro d u c ts \ ' "b ・ ,
p ro du c tN a m e ,
s u p p lie r ı
D ,
c a t e g o r y iD ,
u n it, B æı
E m p lo y e e s E m p iD
*
,
E m pN a m e ,
D es ĵg n a tio n ,
D e p tN a m e ,
S a la r y M ,
a n a ge rN a m e

ahlę 1

d f 720o d it h a th e s t o r a g e ca p a c ity o f 48 M B per


(b ) A h a r d d is k r o ta t e s a t th e s p e e o rpm a n s

it M e n t io n fo la u se d fo r c a lc u la t io n a h d
tr a c k D T ıin e t im
e te r ı e n e e d e d to tr a n s fe r 24 K B o n rm u

sh o w a ll t h e n e c e s s a r y s te p s

d d b y th te r m c lo u d? H o w c ı
o u d ha s c ha n g e d th e co n ce pt o f s to ra ge ?
(c ) W hat do yo u u n e r s ta n e

G iv e a n y tw o re a so n s

k p la in 3 r d g e n e ra t io n o fC o m p u te rs ?
ha t lu t io n a ry c ha n g e to o ce
(d ) W rev o
* * * * * # * G O O D LU CK * * * * * * * #

tţi4ļ..Ĺ
į įį
ĺ.ĵi\ĮŢi,:ĺĺ kį ' Ý.tį ĵ :
Scanned by CamScanner
A tte m p t A ll Q u ës tio n s

l F in d th e liin iit o f th e fo llo w in g (A u em ptA n y tw o )


(0 3 )

ı] n =

(0 3 )

o f th e fo llo w in g a t in d ic a te d p o in ts (A tte n i p t A n y lw o )

'"
Ť8 1Ţþt .
"
tl
l <
2 <
x
x
5 2
< 5; a t x - 2

(・
k
ï (x ) il t ś 2 (04 )

; 1f
=ī '

i f ×2 a c x - 2 a n d x - '
.
Q3 F in d th ¢1jit o f th c fo llo w in g U s in g L U O p ita l R u le (A tte . p t A n y [. . )

? 齟
㈹ "

n t Ē§i
"

91ËĘ B e st O fLu ck

I
:

Scanned by CamScanner
广嘱っ じ

F Iı
ŁS T Y E A R S P
R IN G S E M E
sT E R (C O M P U T E R & IN F o R M
A T Io N S Y
STE M s/
E X A M IN A T IO N 2 0 1 7 C\ \b O C M
T im B A Tc H 2
e 3 H 0 1 6 1 7 & p R E V IO U S
o u rB BA TcH ES

D a te d 1 8 0 4 2 0 17
M a x M a r ks 60

¥i

E i)U s e th e d e ï iT Ła t io ï L o f eon t į ï tılit y d e t e r 了n iï L e


= 2 ï (x )c o n t ir Į e o ì ıs

(V
' "
li' " g
" =
P X 2 T
. : . > 2
'

y n t lė E v a lu a t e t fze in d ic a te d E m it s

(n¥qi) (in(cotxy '" "

0 17 6 th a t If z 1 - Tį (c o s o , 4 ê Ę ): z l - T z (c o s e. + S ĖZ i Lo 6 )
.
ı i + z z - fi F
Į [c o s (0 1 + 0 z) + is in (e i + e z )

そ そた = 。s (0 . 中 e 。) + is in (0 户 同 2 月

(b ) S im p lify

cs
(3 i Y . .

q? (a ) E pr in
ess a s er ie s o f c o s in e s O T s in e s o f m u lt ip le s o f 0 (0 6 )
ó 7
c o s x s in X
(b ) S ta n rĵ 1 0 ta n
3
0 + ta n 5
e (06 )
Pr o v e t h a t ta n so -

1 r 1 0 ta 7 ız o Ą§ta n
4 o

j
" '
"
b)
" " .
"
X dx - + c" ñ " " N

. 1
(b ) ó (0 6 )
co s e e c x dx i o a i

Á . " " t' s i?i7 3 x co s


a
3x dx

(t) U s in g B e t a fu n t tm
t to n
(ii) U s tn g G a m m a î 1łn

Scanned by CamScanner

N
(y

F IR S T Y E A
R S P R IN G S
n V D U S T R IA L E M E S rE R
& M A N U FA (p E T R O L E U M / M E C H
C T U W G A UT O M o A M c A U T E X T IL U
T V E co M PUT ER &
Ï N F O R M A T lo N S Y
A P P L IE D P H ST EM S
Y S IC S / E C O N
O ĦH C S &
F IN A N C U E N G
L IS H しIN G U IS H C

T C H E S
S)
B A T c H 2
T im e 3 H o u rs

D a te d 1 2 0 1 7
M rks 60
P A K IS T A N S
? U D IE S g s ļ o 5
且n s t r u c tio ī
n s (i) A tte m p t liv e q u e s tio n s in a ll

(ii) A Iq
ı u es tio n s c a r r
y e q u a lm a r ks
ke a th o ro u
gh a n a ly s is o fM Jin
r n a h ' s le a d e rs h ip , t a k in g in t o
deveı
o pm t s fr o m a cco u n t th e m i
e n 1 9 1 3 to 1 9 4 6 a o r p o litic a l Ą

rp re t C P E C b r in in i
g g n t o fo c u s so m e k e y in d ic a t o rs a Ħe c tin g p a k is ta '
stra t e g ic im p o r t a n ce A ls o
n s ge o p o litic a l a n d
a p p ly t h e se in d ic a t o rs o n re g io n a la n d g lo b a l s it u a t io n
3 C re a t e a s y n t h e s is o f t h
e ba s ic fu n c t io n s o f t h e s ta te ie Ie g is la t u e x e c u t iv e
t h e s e f u n c t io n s t o t h
re , , a n d İ u d ic ia r r e la te
e m a jo r p ro v is io n s o f th e c o n s t it u t io n o f 1 9 7 3

5 L is t s o m e b a s ic is s u e s in t h e o s it e d ia ı
c o m p o gu e b e t w e e n p a k is t a n a n d \ n o ta A s s e s s t h is
)¢
ip in t h e f re

Ī
c o n te x t o ce n t ha p pe n in g s in K a s h m ir

a b r ie f ı
is t o f fu n da m e n ta l r ig h t s u n de r t h e c o n s t it u t io n o f 197 3 , su p p o rt y o u r a n sw e r w it h
so m e e v id e n ce o f th e v io la t io n s o f th e s e r ig h t s A ls o re c o m m e n d s o rn e s p e c ific m e a s u re s fo r

im p r o v in g th e h u m a n r ig h ts s it u a t io n in P a k is t a n

w r it e s h o rt n o te s o n a n y tw o o f t h e fo lı
o w in g

; Ę
a» Th e iss u e s i n E d u c a t i on se c t o r in P a k i st a n '

b )G e o P h y s ic a l c o n d it io n s o f P a k is t a n

c) Ba s i c fea t u r e s of cu ıtu e an d so c i et y in pa k i st a n ・

Scanned by CamScanner
Y E A R S P R IN G
S E M R S rE R
(C o M p u r E R & ïN F O R M
A n o N s Y sT E M S
A 7 7 0 N 2 o ı7 m C ıi c N Y W
B A T C II 2 0 1 6
iine 3 H o u n 1 7 & P R E V IO U S B
A T c ll E S
D ・ tM 2 0 1 7
m Ľ M ır lw 6a

ÇQ M E P g Ļ E ßQ ĢE B U N G
ı
n s tr u c tı
Caıcuı, a r e ı æ m
o n s 1
*-allowed :: Ï
2 Sho t h e n e c e s s a ry c a ı ı
w
c u a tıo n s a n d in t e r m e d i
a te s t e s he
3 A tt e m p t a ı lEı h t p w re n e c e s s a ry
g q u e s t io n s fr o m s e c tio n A n d
a B
4 A t t e m rım
p a r t s o f e a c h q u e s t io i n n o rd e r

=
ı-
(ĺ n t v a r n 2 ö
C o u t< < v ・r l+ +
c e n t< < v a r i

Ī Ī į t
n m a ĺ n (»
'
ī
' ı ı ı
e '
)
' ' ı
, , , o u
c h a r * t = a r r + 1
,

C O U t< < * t< < I


\t ¢

(* t » + +

e o u t< < * t

ıį ı ī n t n ı
a i n «)
(c h a r * s - "
C O M ]?tJ T E R n

c o u L < < * s < < e n ? i

ī v v o ĺ d m y s t e r y «ĺ n t l = 2 »
s t a tĺ c ī n t n m = 5
n \ ım + = ĺ
c o u t < < "
n tlm S

ī n t n ta ī n O
(m y s t a r y {7 »
m y s t ・r y o

rQ N o 2
T Ţ rėfiū\feil,hėadė
o , fl\, s a re
. '
'

Ĺ "
e į ņ e q u a ı t o o r g r ・a b r ti
n a n 7 \n tı

(ĺ lıt a ĺ z ・= 5 i \
P a 8e 1 o f4

Scanned by CamScanner
q
:◆
:b

iäii=
,

ł ı L m a ī n O
{ m y f u n c o }
v v o ĺ d s o m e f u n c (c o n s t ī n t & I
I -
j } ,
ĺ n t j) 61 1
ī n t i
m a n O
ĺ n t v a r i 4
=
, v a r 2 = 4 0
s o m e f r ın c (v i
a r
,
v a r 2 )
c o u t< < v a r 1< < '
\" < < v a r 2

3 :Cho o s e th e c o rr e c t a n sw e r s fo r g iv ė n
1 A
qu es t io n s ïī:! î!: ī): Nį 4ţ iį ï ŕ :; 2 * $ ; '
t ;. : ;f "
lm
r ra ys a re d to fu n c tio n
pa s se by
s
( v a lu e re fe re n c e g lo b a l v a r ia b le f th e
, ,
,
n o n e o s e )
2 Fo r th e g iv e n a rra y h Į ą Į r f1 0 1B a O Æ a ll th e e le m ts o f
e n a rra y a rr a ft e r in d e x 2 is in it ia liz e d b
y
(1 ga r b a ge v a lu e o f th
,
, ,
n o iıe o e o p t io n s )
3 # İn c lu d e < > llo
fio
a w s p to r e a d
ro gra m o r w r it e d a ta t o o r m th e file

I
(o fs t r e a m ,
io fs t r e a m ,
io s tr e a m
,
fs t r e a m )
4 A ta n 2 0 is a fu n c t io n (b u ilt in u se r d e fin d f th
, e ,
w r o n g ,
n o n e o e s e )
5 C o n s id e r th e fo llo w in g s ta te m e n t H o w m a n y t im e s b o dy f lo ill e x
o o p w t e ? (1 , 0 , in fin it e
e c u
)
,

,
e r r o r

fo r ( ;) {c o tıt < < "


S o ıv ĺ n g C o m p u t e r P r o g r a n un ĺ n g p a p e r
r'
}
6 n o t a t io n is u s e t o a cc e ss m e m b e r o f s tr u c tu re th r o u g h a s t r u c tu r e p o in t e r

¢ N o t s s ib le a t a ll)
( . .
> > . ,
< < , , , p o

(r u t im e b ild t im f th
ght
n u e n o n e o
7 Sy n ta x e rr o rs a r e ca u o n , , e o p t io n s j
8 In E + + lit e ra tu r e
"
> >
"
is k n o w n a s

S tr tr a c t io n o p e r a to r , O u tp u t o p e ra to r , S t r in t io n
(I n p u t o p e ra to r ,
e a m e x e a m s e r o p e ra to r ,
N o n e

o f th e s e )
9 C + + is le v e l la n gu a ge (lo w ,
m id d le ,
h ig h ,
n o n e o f th e se )
be f t im e s th a n a m o u n t o f s ta c k m e m o ry fo r a c tiv a t io n ds
10 If a fu n c t io n is ca lle d m a n y n u m r o re co r

pa ge 2 o f4

Scanned by CamScanner
eì::'.X=X en ín ta r r is a n a rray o í ty p e in

W r ite a s in g le s ta te m en t to in itia liz e th e e le m e n ts o f a 15 e le m e n t a rra y to z e ro


'
[1 ]
The re a re 3 d iffe r e n t w a y s to s to r e s t r in g in C + + D e c la r e a s tr in g to s t o r e D u N ? B R s IÆ in 11 5 ]
/ a ll th r e e p o s s ib le w a ys ( o n ly w r it e s in g le s ta te m e n t s )

[5 】
c) w r ite a s in g le c o r r e c t s ta t e m en t t o ty p e c a s t a n ln t v a r t o a c h a r v a r in c + +

* ) D e fin e a fu n c t io n Is p r im e o th a t t a k e s a n u m ber a s a rgu m en t a n d r e t u r n tr u e if it is a p r im e


2】

n u m b er o th e r w is e r e tu r n fa ls e
V <
:
e ) Co n s id e r a lin k e d ı
is t is m a in t a in e d c o n s is t in g o f re c o rd s o f ty p e
stru c t it e m

{in t It e m ID
flo a t p r ic e
s tr u c t it e m
*
n e x t }
A ss u m in g t h a t s t r u c t it e m * fir s t c o n t a in s t a r t in g a d d re s s o f t h e lis t
i W r it e a s in g \e \in e s t a t e m e n t t o re m o v e fir s t It e m fr o m t in e lis t
ii W r it e a s in g le
*
d p o s it io in t h e fis t
st a te m e n t to in s e rt a n it e m p o in t e d b y s t r u c t it e m p tr a t se co n n

if t h e lis t c o n t a in s o n ly o n e it e m

ın s t r u c t io n s

M alo g ic a l a s s u m p t io n s
k e w h e re n e ce ssa r y a n d s t a t e t h e m c le a r ly
T r y t o w r it e e fĥ c ie n t c o d e D o n o t e n g t e n y o u r a n s w e r s b y w r it in g
l h u n n e ce ssa ry co de
.

fin d Fra c t io n to t o r e a f r a c t io n
Q N o 6 i D e e a s tr u c tu re n a m e s

ii D e fin e fo u r fu n c t io n s n a m e d A d d it io n S u b tra c t io n M u \t ip lic a u o n a n d D Yv \s \o n fo r p e r to r m \n g t h e se

o p e ra t io n s o n t w o f r a c t io n s Ea c h o f th e se fu n c t io n ta k e tw o a rg u m e n ts o f tv p e F r a c t io n a n d re tu r n

r e s u lt a g a in o f ty p e F ra c t io n

H e r e A re th e fo r m u la s fo r th e fo u r a r ith m e tic o pe ra tio n s a p p lie d to fra c tio n s


A d d itio n a lb + c /d (a d + b c ) / (bd) S u b t r a c tio n a ıb c ı
d ・
(ad b c ) ıtb dl

M u ı tip ı
ic a tio n a /b c /d (a c ) / (bd} D iv İ s io n a lb I c Jd ・
(ad) I (bc)

D e fin e fu m n In p u t 闭目望E n o t h a t t a k e s a s in ? a rgu m e n t o f t y p e F r a c t io n (Q N o 6 p a rt Ĥ w \t h r e t u rn

t io n t h r o u g h p a s s b y r e fe r e n c e T h is fu n c t io n w \\\ In p u t
p a s s t o t h is fu
id T h e a
ty p e v o a rg u m e n t is n c

fr a c t io n fr o m u se r in t h e v a r ia b le d e c la r e a s a rg u m e n t

, ' " m e M M . . ' " . " M , ' " . ' " M . .


ii
XTX0. :r: F i
,
' ' "

iii m p le m
ı e n t a fo u r fu n c t io n F r a c t io n Caı
cu ı
a to r u s in g sw itc h ca se by ca \\\n g a lre a d Y d e fin e d fu n c tio n s \Q
N o 6 p a r t ii a n d Q N o 7 i , ii) T he use r s ho u d ty p e th e firs t fr a c tio
ı n ,
a n o p e ra to r , a n d a secon d tra c tio n

Pa ge 3 o f4 ī

Scanned by CamScanner
T h e p ro g r a m s ho u ld th e n d is p la y th e re s u lt p r o g r a m o u tp u t sho u ld lo o k ı
ik e t h is
Fo u 】 Fu n c t io n F r a c tio c a lc u la t o r
n

E n t e r e x p r e s s io
n : 1 /4 + 1 /4
-
lz
E n te r (E / e ) ţ o e x it y
E n te r e x
pr e s s io n 1 /2 4 1 /9
1/18
t o e x it : e

Q No 8 i W r it e a p ro g ra m in h ic h u s in g dyn ic l\o i d e c la f t h e le
w a m m e m o ry a cat o n ,
re a lo n g a rra y o n g th u se r

w a n ts Pa ss th a t a rra y a n d it s s iz e a s a r g u m e n t t o fu n c t io n \rbp u t A r ra 0 S to re /W r it e a \\ t h e
y
e le m e n ts o f th e s a m e a rra y in a file n a m e d in t e g e r a rra y Tx t
"
In t h e e n d do n t fo r g e t t o fr e e

m e m o ry th a t w a s r e s e rv e d d y n a m ic a lly
W r it e a p p r o p r ia t e d e fin it io n o f fu m c t io n In p u t A rr a y 0 t o in r u t a ll t h e e le m e n t s fr o m u se r in a r ra y
ii D e fin e a fu n c t io n s w a po t h a t p e r fo ľ m sw a p p in g o ftvo v a r ia b \e (
s ty p e f\o a t ) u s in g p o in t e r s

Scanned by CamScanner
ť lu V

E L E C T R C N IC
T E L E C O M M UN ı
ı C A T O N S
E N G IN E E R IN G )
E X A M IN A T IO N 2 0 1 7
B A T C H 2 0 16 1 7 & P R E V ıO
T im e 2 yı H U S BA T C H E S
o u rs
D a te d 14 0 4 2 0 17
M a x M a r ks 40

E Y N A L EN G Ļ IS H H s 1 14

TRùCTION& A tte m p t F o u R u
q e s tio n s in a ı
l Q u e s t io n 2 is
n o co m pu ı
so r y

2 R ea d th e fo llo w in g p a s s a e
g c a re ? lı
y an d a n sw e r th e q u e s tio n s th a t fo llo w 11o ]
A c c o r d in g t o th e e s t im a te s o fW o r ld
lth O r g a n iz a tio n th e r e a r e aH
p p r o x im a te ly ] 1 b illio n s m o k e r s
e a
in th e w o r ld , a bo u t th ir d o
f th e g lo b a l p o p u la tio n a e d 1 5 e a r
o n »
g y s a n d o v e r G iv e n th e
to b a c c o r e la te d d is e a s e s th is r e g r a v ity o f
, p r e s e n t s i
a m a ss v e b u r d e n o n th e w o r lď s h e a lth c a r e
s y s te m s T h e
fig u re s r e la te d to th e e c o n o m ic a d
n s o c ia ıc o s t o f to b a c c o a b u s e d
o n o t in c ı u d e th e ill e ffe c ts s u ffe r e d
b y p a s s iv e s m o k e r s
p e r s o n s in h a lin g th e to b a c c o s m o k e fr o m o th e r s S u r v e s u n d e t k
r a e n in p a k is ta n
,
y
in d ic a te th a t th e r e a r e a t le a s t 2 2
m illio n s m o k e r s in th e c o u n tr d tl h e r s w h o u s e th e
y a n c o u n e s s o t
s u b s ta n c e in h u k k a s s h is h a s o r i th
n e fo r m o f c h e w in t b
,
g o a c c o

W h ile th e g o v e r n m e n t r e o r te d
p ly e a r n s R s 3 8 b illio n a u th e to b a c c o in d u s tr y th is m u s t b e
y e a r , tr o ,
o ffs e t b y th e d r a in o n th e c o u n tr ' s h
y e a lth c a r e s s te m y h ic h is lik e ly to b e fa r g r e a te r T h e e c o n o m ic
w
c o s ts o f to ba c co r e la te d illn e s s e s h a v e n ev er be e n fu lly ta b u la te d in p a k is ta n y e t th e y a r e v ir tu a lly
:
c e r ta in to be co ı
o ssa l T bacc o th u
o u se s p u ts u n n e c e ssar y p r e s s u r e o n th e s u b s id iz e d s ta te h e a lth c a r e
s y s te m ,
w h ic h is a lr e a dy n o to r io u s ly o v e r s tr e tc he d an d d e r fu n d e d A t th e s a m e tim e to b a c c o u s e
u n

a ls o le a d s to a ta n g ib le d r o p in th e fin a n c ia lc o fo r t a n d q u a lity o f life o f th e


m c it iz e n s E ac h p a c k bo u g h t
as w e ll as th e tr e a tm e n t o f co n se qu en tia l illn e s s r e p r e s e n ts a b u r d e n o n h o u s e in o d in
ı co m es

n ıe s e fa c to r s c o m b in e m e an w h ile , to sig n ific a n tly a f c t th e p r o d u c tiv ity le v e ls o £th e w o r k fo r c e a t a


t im e w h e n th e c o u n tr y fa c e s g r a v e ec o n o m ic c h a lle n g e s a n d s u ffe r s th e k n o c k o n e ffe c ts o f a g lo b a l

r e c e s s io n D is tr e s s in g ly th e f to b a c c o
a b u s e a p p e a r s to b e g r o w in g in P a k is ta n , e v e n a m o n g s t th e
,
r a te o

e d u c a te d y o u n g w h o l
g y ta k i g to th e h a b it w h ile in s c h o o l o r c o lle g e It is im p e r a tiv e th a t
a re
n in c r e a s in

s tr ic te r m e a s u r e s b e ta k e n to c o n tr o l th is m e n a c e E a r lie r e ffo r ts s u c h a s b a n n in g s m o k in g o n p u b lic

tr a n s p o r t a n d d is c o u r a g in g th e g la m o r iz a tio n o f th e h a b it in th e m e d ia h a d y ie ld e d s o m e r e s u lt s M o re

m u s t b e d o n e , h o w e v e r , T o b a c c o u s e m u s t b e b a n n e d in p u b lic a r e a s a n d rn o s t im p o r ta n tly , r e g u la tio n s

re s tr ic tin g th e s a le o f to b a c c o to m in o r s m u st be s tr in g e n tly e n fo r c e d M e a n w h ile th e c itiz e n r y m u s t


be e d u c a te d a b o u t th e d a n g e r s o f u s in g th e su b s ta n ce in a n y fo r m a s th e r e is n o s a fe w a y o f s m o k in g
(3 53 W o r ds )

A A n s w e r th e fo llo w in g q u e s t io n s (0 6 )

(a ) W n o is a p a s s iv e s m o k e r ? (0 1 )
l th e f to b a c c o a s m e n tio n e d in
. (b ) S ta t e fo u r ty p e s o f m e a s u r e s w h ic h can b e ta k e n to c o n tr o m en ace o

穫矜 燾 皎ıe a b o v e p \ ał 》h (0 2 )
˜ 。

' :
(c ) H o w m uc h do e s th e government e am an n u a lly fr o m to b a c c o in d u s tr y ? (0 1 )
(自H o w is th e u se o f to b a c c o a ffe c t in g o u r c itiz e n r y a n d h e a lth c a r e s y s te m ? (0 2 )

4 2 B h e th e r th e fo lı
S ta t e w o w in g s ta te m e n ts a r e T r u e o r F a ls e a c c o r d in g to th e a b o v e p a s s a g e
A ls o

g iv e b r ie f r e m o n s fo r y o u r a n s w e r s (0 2 )
a ) T h e e c o rro m ic c o s ts o f to b a c c o r e la te d illn e s s e s h a v e n e v e r b e e n fu lly ta b u la te d in P a k is ta n
b ) T h e r a te o F to b a c c o a b u s e a p p e a r s to b e g r o w in g in P a k is ta n e v e n a m o n g s t th e u n e d u c a te d ,

y o u n g w h o a r e in c r e a s in g ıy ta k in g to th e h a b it w h ile in s c h o o l o r c o lle g e
c ) T h e r e is a s a f e iv a y o f s m o k in g
d ) T o b a c c o u s e a ls o le a d s to a n in ta n g ib le d r o p in th e fin a n c ia l c o m fo r t o f c itiz e n s
1p ır « ħ

Scanned by CamScanner
:
Ĺ
: Q 2z Cu
y ivv ee mth e m e a n iin
lGi J g fan
o t y F Ę f th e fo llo in g w o rd s a s u s e
o w d In th e p a s s a g e (0 2

G ra v ity , m a s s iv e , a bu se , co ı
o ssa ı
, s u b s id iz e d , m rs

Q3 D r a ft a p r é c is o f th e a bo v e te x t in a b o u t ]0 0 12 0 w o rds a n d g iv e a s u ita b le tit le [1 0 ]

Q4 A W r ite a s u ita b le to p ic sen te n c e a n d co n c ı


u d in g se n te n c e fo r th e g iv e n p a r a g r a p h (0 2 )

[n th e d e v e ı o p in g w o r ld
1 1 b illio n p e o p le s till la c k a c c e s s to s a fe d r in k in w a te r 2 6 b illio n d o n o t h a v e a c c e s s to a d e u a te
g , + q
s a n ita tio n s e r v ic e s a n d m o r e th a n 1 6 m illio n d e a th s e a c h
, y e a r a r e tr a c e d to w a te r b o r n e d is e a s e s (m o s tly
in c h iı d r e n u n d e r ū v e ) A ll to o o fte n in d e v e lo in e to th e
p g c o u n tr ie s w a t e r is c o s t ly o r in a c c e s s ib ı
p o o r e s t in s o c ie ty w h ile th e w e a lth y h a v e it p ip e d in to th e ir h o m e s In a d d it io n b e c a u s e o f t h e ,

in fr a s tr u c t u r e th a t js u s e d to c o n tr o l w a te r w h o le s e a s a r e b e in ı
g o s t, r iv e r s a r e r u n n in g d r y , m illio n s o f
,

pe o pı e h a v e b e e n d is p ı a c e d to m a k e r o o m fo r r e s e r v o irs g r o u n d w a te r aquirs a r e b e in g p u m p e d d o w n

\ B D O i n s an d w r ite a 12 0 15 0 w o rd s p a r a g ra ph o n A N Y O N E o f th e g iv e n to p ic s (0 8 )

a Iiber b PSL Im p o ib le is n o t h in
c ss g

- Q5 W r ite do w n an essa y o f 300 350 w o rd s o n A N Y O N E o f th e fo llo w in g to p ic s [1 0 ]


N o te U n derı
in e th e th e s is s ta te m e n t

a ) OVernight su c ce ss is a m y th
b) N o hum an d e s e r v e to b e o p pre sse d ju s t b e c a u s e o f th e ir b ir th p ı
ace
c) M y ro Je a s a c itiz e n o f e a r th
d) T he ro le o f s c ie n ce in b u ild in g a b e tte r w o r ld

g £3 co q ţg x t d e te rm in e th e m e a n in g o Fe ac h h ig h ı ig h te d w o r d P ro v id e o n e w o rd o r p hra sat
Īġ i lig h te d w o rds in y o u r o w n s e r ıe n c e s [1 0 1
t

a ) Y o u r p o s te r is v e ry g o o d T h d r a w in g r e a lly le t s p e o ı
p e kn
e
th in k th a o w w ha t o u r c lu b is a lJ a b o u t I do
t yo u co ld h
u e n a n c e it b y a d d in g s o m e m o r e c o lo r U ï te n d gra b e v e ry o n e
'
a « e n t io n s

b) Ī b e a t P a u la w h e n w e ı
u st c a n
'
t
p a y c h e s s ! E v e n t t im e I m a k e a m o v e th a t s h o u ld ı e a d m e to
v ic to r y s h e m a k e s a b e tt e r m o
v e th a t 1 /ï w a r ts m
y p la n
,

c ) T h e o w n e r o f th e r e s t a u r a n t w
o u ld n t a ı
'
lo w S a m a n th a to w a lk th r o u g h th e d o o r J m s o rr y " '

s h e s a id b u t y o u s t a r te d a fo o d fi h t t h
g e la s t t im e y o u w e r e h e r e y o u m a y n o t h a v e in g . e s r
to m y r e s ta u r a n t ! "

d ) A m y w a s fe e lin g lo w E v e r y b u s in e s s s h e tr ie d lo s t m o n e o r
y m a d e o n ly p e n n ie s a d a y H er
n e w e s t id e a w a s s e llin
g c h o c o la te c o v e r e d b a b y s h o e s S h e w a s c o n v in c e d th a t it w o u ld b e a
lu c r a tiv e b u s in e s s H e r fr ie n d s tr ie d to w a m h e r th a t it
w a s n o t a c e r ta in r o a d to r ic h e s
e ) H e le n s a tt itu d e to w a r d d e a lin
'

g w it h c r im in a ls h a s c h a n g e d o v e r th e y e a r s S h e u s e d to b e lie v e
th a t e v e r y o n e c a n c h a n g e a n d d e s e r v e s a s e c o n d c h a n c e S h e n o w b li
e e v e s th a t s o m e c r im e s a r e
s o h e in o u s th a t th o s e r e s p o n s ib le s h o u ld b e s h o w n n o m e r c
y \

Ï )

Scanned by CamScanner

You might also like