You are on page 1of 11

PROGRAMMING LANGUAGE C

1. main()
{
int a=4,b=2;
a=b<<a + b>>2;
printf("%d", a);
}
a) 32 b) 2 c) 4 d) none
2. main()
{
int ptr=(int)ma!!oc("i#eof(int));
ptr=4;
printf("%d",(ptr)+++ptr++);
}
a) $ b) % c) &'ntime error d) none
3. (define )*+ 3
main()
{
printf(")*+ = %d ,n",)*+ );
('ndef )*+
(ifdef )*+
printf("-ector .n"tit'te/);
(endif
}
a) )*+=3, -ector .n"tit'te b) )*+=3 c) -ector .n"tit'te
d) 0ompi!e time error
4. int arra123={1,2,3,4,4,5,$,6};
(define 7.89 ("i#eof(arra1):"i#eof(int))
main()
{
if(;1<=7.89) printf("1");
e!"e printf("2");
}
a) 1 b) 6 c) 2 d) 4
4. main()
{
int ptr23 = {1,2,23,5,4,5};
printf("%d",<ptr233;<ptr2=3);
}
a) 1 b) 2 c) 4 d) none
5. main()
{
c>ar inp't23 = "777?.@A90B1,1,1";
int i, c;
for ( i=2; (c=inp't2i3)C=D,=D; i++) {
"Eitc>(c) {
ca"e DaDF p'tc>ar (DiD); contin'e;
ca"e D1DF breaG;
ca"e 1F E>i!e (( c = inp't2++i3) C= D,1D << cC= D,=D);
ca"e D9DF ca"e D@DF contin'e;
defa'!tF p'tc>ar(c);contin'e;
}
p'tc>ar(D D);
}
p'tc>ar(D,nD);
}
a) 7?.A0B b) 77?.@. c) 7.9B1 d) compi!e time error
$. main()
{
int a233243 ={1,2,3,4,4,5,$,6,%,1=,11,12} ;
int i, H , G=%% ;
for(i==;i<3;i++)
for(H==;H<4;H++)
if(a2i32H3 < G) G = a2i32H3;
printf("%d", G);
}
a) $ b) % c) 3 d) 1
6. main()
{
c>ar p23 = ">e!!o Eor!dC";
p = "Iector";
printf("%"",p);
}
a) Iector b) >e!!o Eor!dC c) >e!!o Eor!dC Iector d) none
%. main()
{
en'm JtaK{ !eft=1=, riK>t, front=1==, bacG};
printf("%d, %d, %d, %d", !eft, riK>t, front, bacG);
}
a) 1=,=,1,2 b) 1=,11,1==,1=2 c) =,1,2,3 d) none
1=. main()
{
c>ar a"23 = ",,=,=";
int i = =;
do{
"Eitc>( a"2i++3) {ca"e D,,D F printf("*");
breaG;
ca"e = F printf("L");
breaG;
defa'!t F printf("0");
breaG;
}
}E>i!e(i<3);
}
a) *0L b) *0L0 c) L0* d) 0L*0
11. main()
{
M.@9 f";
c>ar c21=3;
f" = fopen(N"o'rce.tOt/, /r/); : "o'rce.tOt eOi"t" and contain" N-ector .n"tit'te/ :
f"eeG(f",=,799PJ9QR);
f"eeG(f",;3@,799PJ0S&);
fKet"(c,4,f");
p't"(c);
}
a) 'te b) it'te c) t'te d) none
12. main()
{
int a=1=,b;
b=a>=4T1==F2==;
printf("%d,n",b);
}
a) 1= b) 4 c) 1== d) 2==
13. main()
{
eOtern int i;
i =2=;
printf("%d,n","i#eof(i));
}
a) 2 b) 4 c) 1 d) none
14. main()
{
int i = 1=;
printf(" %d %d %d ,n", ++i, i++, ++i);
}
a) 11 11 13 b) 13 11 11 c) 11 12 13 d) 13 12 11
14. main()
{
'n"iKned int G = %6$ , i = =;
c>ar tran"21=3;
do {
tran"2i++3 =(c>ar) (G%15 > % T G%15 ; 1= + DaD F D,=D );
} E>i!e(G := 15);
printf("%",n", tran");
}
a) bd b) cf c) eK d) none
15. main()
{
"tr'ct te"t
{
c>ar c;
int i;
c>ar m;
} t1;
printf("%d %d,n", "i#eof(t1), "i#eof(t1.c));
}
a) 4 1 b) 5 2 c) 4 2 d) none
1$. main()
{
printf("%O",;1<<4);
}
a) MM== b) MMMM c) MMM= d) 0ompi!e time error
16. main()
{
int Iar1=12, Iar2=34;
printf(N%d/,maO(Iar1,Iar2));
}
int maO(int O, int 1)
{
O>1T ret'rn OF ret'rn 1;
}
a) 12 b) 34 c) compi!e time error d) r'n time error
1%. main()
{
int O, arr263={11,22,33,44,44,55,$$,66};
O=(arr+2)233;
printf(N%d/,O);
}
a) 33 b) 55 c) 44 d) $$
2=. "tr'ct taK{
a'to int O;
"tatic int 1;
};
main()
{
"tr'ct taK ";
".O=4;
".1=4;
printf(N%d/,".O);
}
a) 4 b) 4 c) % d) none
DIGITAL
21. * Lipo!ar tran"i"tor >a" a tota! of
a) AEo "imi!ar!1 doped reKion" b) A>ree a!ternatiIe!1 doped reKion"
c) AEo a!ternatiIe!1 doped reKion" d) A>ree "imi!ar!1 doped reKion"
22. ?>ic> tran"i"tor c'rrent form'!a i" correct
a) .0=.L+.9 b) .L=.0+.9 c) .9=.L;.0 d) .L=.9;.0
23. LUA i" aJJJJJJJJJJJJJJJ
a) -o!taKe contro!!ed deIice b) rectifier
c) c'rrent contro!!ed deIice d) inIerter
24. A>e "'m of binar1 format" 1=1=1=1= and =1111 i" JJ
a) 126 b) 2$1 c) 2== d) 242
24. ?>ic> t1pe of error Ea" e!iminated t>ro'K> t>e '"e of Kra1 code
a) timinK b) decodinK c) encodinK d) conIer"ion
25. .f a parit1 bit i" added to a fo'r bit Eord, >oE man1 o'tp't !ine" Ei!! be reV'ired after
m'!tip!eOinK T
a) 4 b) 1 c) $ d) %
2$. .n a 1==PB# fo'r;"taKe freV'enc1 diIider, if t>e 0@9*& inp't to "taKe tEo i" @W?, E>at
Ei!! be t>e fo'rt>"taKe o'tp't freV'enc1 T
a) 4= PB# b) 12.4 PB# c) =.=PB# d) 24 PB#
26. BoE man1 c!ocG p'!"e" reV'ired to !oad 4;bit 7.XW reKi"ter and tran"fer t>e data to a
o'tp't reKi"ter.
a) 15 b) 6 c) 4 d) 4
2%. ?>ic> t1pe of deIice ma1 be '"ed to interface a para!!e! data format Eit> an eOterna!
eV'ipment" "eria! format T
a) Pe1 matriO b) )emor1 c>ip c) S*&A d) 7.XW
3=. .f =====111 in a reKi"ter i" ">ifted to read ==111===, t>e arit>metic operation i"
a) +2 b) +4 c) +15 d) +6
Micro Processor (8085/8086): ( e!ec" ei"#er $ % 8085 / $ % 8086 )
8085:
31. A>e 6=64 microproce""or i" an JJJ bit microproce""or. .t i" a JJJJJ pin .0.
a) 6 , 2= b) 15 , 4= c) 15 , 2= d) 6 , 4=
32. A>e fo!!oEinK are tr'e abo't 6=64 eOcept t>at, JJJJJJ.
a) .t i" man'fact'red b1 '"inK Q)W7 tec>no!oK1
b) .t i" >aIinK on;c>ip c!ocG Keneration faci!it1
c) .t >a" 6 addre"" !ine"
d) @oEer order addre"" b'" i" m'!tip!eOed Eit> data b'"
33. A>e "tat'" reKi"ter or f!aK reKi"ter of 6=64 inc!'de JJJJJJ f!aK".
a) 3 b) 4 c) $ d) %
34. A>e data condition", after eOec'tion of an arit>metic or !oKica! operation" are indicated
b1 "ettinK or re"ettinK t>e JJJJJJJJJJJ ca!!ed f!aK".
a) M!ip;f!op" b) !atc>e" c) reKi"ter" d) Kate"
34. *ddre"" @atc>e 9nab!e(*@9) "iKna! i" '"ed to de;m'!tip!eO JJJJJJJJ and JJJJJJJJJ
b'"e".
a) *ddre"" , data b) *ddre"", contro! c) Rata,contro! d) Qone of t>e aboIe
35. 7.R and 7WR "iKna!" are '"ed JJJJJJJJJJJJJJJ.
a) Mor 7eria! comm'nication b) Mor R)* operation
c) L1 "!oE operatinK perip>era!" d) Qone of t>e aboIe
3$. .n t>e 6=64, t>e mac>ine c1c!e ma1 con"i"t" of JJJJJJJ to JJJJJJJ A;"tate".
a) 2, 4 b) 3,5 c) 2,6 d) 3,6
36. A>e 6=64 in"tr'ction c1c!e con"i"t" of one to fiIe mac>ine c1c!e".A>e fir"t mac>ine c1c!e
of eac> in"tr'ction c1c!e i" a!Ea1" JJJJJJJJJJJJJ mac>ine c1c!e.
a) .:W read b) .:W Erite c) )emor1 read d)Qone of t>e aboIe
3%. A>e JJJJJJ in"tr'ction i" )ac>ine contro! in"tr'ction.
a) B@A b) XS7B c) .Q d) @R*
4=. A>e n'mber of Ea1" in E>ic> t>e operand information i" "pecficied in t>e in"tr'ction
code are JJJJJJ.
a) 4 b) 4 c) 12 d) 24
41. A>e data b'" of an1 microproce""or i" a!Ea1"
a) Snidirectiona! b) Li;directiona! c) 9it>er 'nidirectiona! or bi;directiona!
d) Qone of t>e aboIe
42. .n a microproce""or ba"ed "1"tem, t>e "tacG i" a!Ea1" in
a) )icroproce""or b) &*) c) &W) d) 9X&W)
43. .n 6=64 microproce""or ,t>e .:W deIice" can be '"ed in
a) )emor1 mapped .:W on!1 b) .:W mapped .:W on!1
c) )emor1 mapped .:W or .:W mapped .:W d) Qone of t>e aboIe
44. .n 6=64 micproce""or,in re"pon"e to &7A $.4 interr'pt t>e eOec'tion i" tran"ferred to
memor1 !ocation.
a) ====B b) ==20B c) ==34> d) ==30B
44. ?>ic> of t>e data tran"fer i" not po""ib!e in 6=64 microproce""or T
a) )emor1 to acc'm'!ator b) *cc'm'!ator to memor1
c) )emor1 to memor1 d) .:W deIice to acc'm'!ator
45. JJJJJJJJJt1pe of *R0 i" t>e fa"te"t t1pe of *R0.
a) M!a"> b) 0o'nter c) R'a! "!ope
d) 7'cce""iIe approOimation
4$. A>e n'mber of comparator" in a 4;bit f!a"> t1pe *R0 i" JJJJJJJJ .
a) 4 b) 4 c) 14 d) 15
46. *n *R0 i" '"'a!!1 con"idered a" an JJJJJJJJJ.
a) 9ncoder b) Recoder c) Ari;7tate @oKic d) Qone of t>e mentioned
4%. A>e re"o!'tion of a 4 bit co'ntinK *R0 i" =.4 Io!t". Mor an ana!oK inp't of 5.5 Io!t",t>e
diKita! o'tp't of t>e *R0 Ei!! be JJJJJJJ .
a) 1=11 b) 11=1 c) 11== d) 111=
4=. A>ere are JJJJJ t1pe" of R*0Y" aIaib!e.
a) 2 b) 3 c) 4 d) 4
8086:
31. ?>at i" t>e maOim'm c!ocG freV'enc1 in 6=65T
a) 4)B# b) 4)B# c) 5)B# d)$)B#
32. 7i#e of t>e .X reK in 6=65 i";;;;;;
a) 6 bit" b) 15 bit" c) 2= bit" d) 24 bit"
33. ;;;;;;reKi"ter can be c>anKed direct!1 '"inK XWX in"tr'ction
a) "" b) e" c)d" d) c"
34. 7.) i";;;;;;;;;;;;;;;;;;;
a) "eria! interr'pt ma"G. b) "et interr'pt monitor
c) "et interr'pt ma"G d) "eria! interr'pt monitor
34. ?>at i" t>e "i#e of t>e in"tr'ction V'e'eT
a) 4 b1te" b) 5 b1te" c) 6 b1te" d) 2 b1te"
35. ?>at i" t>e "i#e of eac> "eKment in 6=65T
a)12Gb b) 32Gb c) 54Gb d)126Gb
3$. ?>ic> micro proce""or accept" t>e proKram Eritten for 6=65 Eit> o't an1 c>anKe"
a) 6=64 b) 6=6$ c) 6=66 d) 6=265
36. ?>ic> are t>e ba"ic part" of 6=65T
a) L.S b) 9S c) pipe!ininK d) a and b
3%. 6=65 i" ;;;;;;;bit microproce""orT
a)6 b)15 c)2= d) 24
4= *monK a!! E>ic> one i" co Zproce""or for 6=65T
a) 6=64 b) 6=6$ c) 6=66 d) 6=265
41. BoE man1 Kenera! p'rpo"e reKi"ter" aIai!ab!e in 6=65T
a) 4 b) 6 c) 1= d) none
42. ;;;;;;;;;;;;;;;;;reK (in 6=65)contain" t>e addre"" of t>e neOt in"tr'ction to be fetc>edT
a) bp b) "p c) pc d) ip
43. ?>ic> 7eKment i" '"ed to "tore interr'pt and "'bro'tine ret'rn addre"" reKi"ter".
a) "" b) e" c) d" d) c"
44. ?>ic> M!aK can be "et or re"et b1 t>e proKrammer and a!"o '"ed to contro! t>e
operation of t>e proce""orT
a) trace b) interr'pt c) direction d) a!!
44. [iIe eOamp!e of ma"Gab!e interr'ptT
a) &7A $.4 b) &7A 5.4 c) A&*X d) a and b
45. )W- 0O, 1234B in"tr'ction be!onK" to E>ic> addre""inK mode T
a) &eKi"ter b) memor1 c) direct d) .mmediate
4$. 6=65 in"tr'ction" Iaried from ;;;;;;;;;;; to ;;;;;;;;;; b1te" T
a) 1 to 2 b1te" b) 1 to 3 b1te" c) 1 to 4 b1te" d) none
46. 6=65 prefetc>e" on!1 E>en at !ea"t ;;;;;;;;;;;; b1te" are free in V'e'e.
a) 4 b) 3 c) 2 d) 1
4%. *n &7;232 interface i"
a) a para!!e! interface b) a "eria! interface c) printer interface
d) a modem interface
4=. 6=65 >a" ;;;;;;;;;;;;;; f!aK "iKna!".
(a) 3 b) 4 c) $ d) %
APTITUDE:
41. * train pa""e" a "tation p!atform in 35 "econd" and a man "tandinK on t>e p!atform in 2=
"econd". .f t>e "peed of t>e train i" 44 Gm:>r, E>at i" t>e !enKt> of t>e p!atformT
a) 12= m b) 24= m c) 3== m d) none of t>e"e
42. .n one >o'r, a boat Koe" 11 Gm:>r a!onK t>e "tream and 4 Gm:>r aKain"t t>e "tream. A>e
"peed of t>e boat in "ti!! Eater (in Gm:>r) i"F
a) 3 Gm:>r b) 4 Gm:>r c) 6 Gm:>r d) % Gm:>r
43. .f O=1=2# and O1#=245 t>en E>at i" t>e Ia!'e of OT.
a)12 b)4 c)15 d)5
44. Xipe * can fi!! a tanG in 2= min'te" and Xipe L in 3= min" and Xipe 0 can empt1 t>e
"ame in 4= min"..f a!! of t>em EorG toKet>er, find t>e time taGen to fi!! t>e tanG.
a) 1$ 1:$ min" b) 2= min" c) 6 min" d) none of t>e"e
44. A>ere i" an e!ement E>ic> trip!icate" in eIer1 >o'r. 9ac> of t>e"e 3 item" in t'rn
reprod'ce eOact!1 3 ot>er item". .f a "inK!e compo'nd i" Gept in a container at noon and
t>e container i" f'!! b1 midniK>t. *t E>at time i" t>e container 1:3 f'!!.
a) 4pm b) 5pm c) %pm d) 11pm
45. )r. 7>a> decided to Ea!G doEn t>e e"ca!ator of a t'be "tation. Be fo'nd t>at if >e Ea!G"
doEn 25 "tep", >e reV'ire" 3= "econd" to reac> t>e bottom. BoEeIer, if >e "tep" doEn
34 "tair" >e Eo'!d on!1 reV'ire 16 "econd" to Ket to t>e bottom. .f t>e time i" mea"'red
from t>e moment t>e top "tep beKin" to de"cend to t>e time >e "tep" off t>e !a"t "tep at
t>e bottom, find o't t>e >eiK>t of t>e "tair Ea1 in "tep"T
a) 16 "tep" b) 24 "tep" c) 45 "tep" d) 32 "tep"
4$. ?>at i" t>e mi""inK n'mber in t>i" "erie"T 6 2 14 5 11 T 14 5 16 12.
a) $ b) 4 c) % d) 1=
46. 0an 1o' find o't E>at da1 of t>e EeeG Ea" Uan'ar1 12, 1%$%T
a) Friday b) Saturday c) monday d) Wednesday
4%. * per"on Ea!GinK 4:5 of >i" '"'a! rate i" 4= min'te" !ate. ?>at i" >i" '"'a! timeT
a) &".1$.4= per GK. b) &". 24.34 per GK. c) &". 12.45 per GK d) &". 22.14 per GK
5=. * Karri"on of 33== men >a" proIi"ion" for 32 da1", E>en KiIen at a rate of 64= Kram"
per >ead. *t t>e end of $ da1" a reinforcement arriIe" and it Ea" fo'nd t>at noE t>e
proIi"ion" Ei!! !a"t 6 da1" !e"", E>en KiIen at t>e rate of 624 Kram" per >ead. BoE,
man1 more men can it feedT
a) 144= men b) 124= men c) 1$== men d) 24= men
51. A>e "'m of a n'mber and t>e n'mber precedinK it i" 33. L1 >oE m'c> i" tEo !e"" t>an
"iO time" t>e n'mberT
a) 1%5 b) %4 c) %= d) 1==
52. .f t>e !enKt> and breadt> of a room are increa"ed b1 1 feet eac>, t>e perimeter increa"e"
b1 15 feet. Mind 1
a) 6 b) 2 c) 5 d) 4
53. Wne;fo'rt> of a n'mber i" Kreater t>an one;fift> of t>e n'mber "'cceedinK it b1 1. Mind
t>e n'mber.
a) 24 b) 42 c) 35 d) 46
54. *n oi! c1!inder Ea" 3:4t> f'!!. ?>en tEo bott!e" of oi! i" po'red into it, it i" 4:4t> f'!!. BoE
man1 bott!e" of oi! can t>e f'!! c1!inder >o!dT
a) 2= b) 14 c) 4= d) 3=
54. A>e ratio of pre"ent aKe of * and L i" 4F3. * Ei!! be 251r" o!d in 51r" from noE. BoE o!d
i" L noET
a) 141r" b) 2=1r" c) 241r" d) 1=1r"
55. * profit of &". 4== i" diIided betEeen + and \ in t>e ratio of ] F &:' .?>at i" t>e difference
betEeen t>eir profit ">are" T
a) &". 2== b) &". 1== c) &". 3== d) &". 4=
5$. A>e "'m of t>e pre"ent aKe" of *, L, 0 i" 44 1r". A>ree 1ear" aKo t>eir aKe" Eere in t>e
ratio 1F2F3. ?>at i" t>e pre"ent aKe of *
a) 1=1r" b) 51r" c) 61r" d) %1r"
56. .f t>e denominator of a fraction i" increa"ed b1 4, t>en t>e fraction become" 4:6. .f t>e
n'merator i" 11 !e"" t>an t>e denominator, find t>e n'merator.
a) 24 b) 2= c) 3= d) 34
5%. 14;manKoe" and $;app!e" co"t a" m'c> a" 1=;manKoe" and %;app!e". ?>at i" t>e ratio
of co"t of one manKo to co"t of one app!eT
a) 2F4 b) 4F2 c) 3F4 d) 0annot be determined
$=. * per"on "o!d >i" Eatc> for %5 ^ and Kot "ome percentaKe of profit E>ic> Ea"
n'merica!!1 eV'a! to t>e co"t price. ?>at i" t>e co"t price of t>e Eatc>
a) 4= ^ b) 44 ^ c) 5= ^ d) 6= ^
$1. Aap * can fi!! an empt1 tanG in 5;>o'r" and Aap L can empt1 t>e f'!! tanG in 6;>o'r". .f
t>e tanG i" empt1 E>en tap * i" opened at %F== am and tap L i" opened at 11F== am,
t>en at E>at time i" t>e tanG fi!!edT
a) 5F==pm b) 3F== am c) 3F==pm d) 5F==am
$2. 2= men can p!ant 4= "ap!inK" in 6;>o'r". .n >oE man1 >o'r" can 14men p!ant 6=
"ap!inK"T
a) 1$ &:(5 b) 12 ):&& c) 2= d) Qone of t>e"e
$3. * man can roE at 5 Gm:> in "ti!! Eater and at 4 Gm:> 'p"tream. BoE !onK Ei!! t>e man
taGe to Ko to a p!ace 1 Gm doEn"tream and ret'rnT
a) 35 min b) 24 min c) 12 min d) 16min
$4. 7ome te!eKrap> po!e" are p!aced 2= m apart. BoE man1 po!e" Ei!! a train pa"" in 3;
>o'r" at 5=Gm:> T
a) 12== b) 24== c) 4=== d) %===
$4. A>e "V'are of a tEo diKit n'mber i" diIided b1 >a!f t>e n'mber. *fter 35 i" added to
t>eV'otient, t>i" "'m i" t>en diIided b1 2. A>e diKit" of t>e re"'!tinK n'mber are t>e
"ame a" t>o"e in t>e oriKina! n'mber, b't t>e1 are in reIer"e order. A>e tenD" p!ace of
t>e oriKina! n'mber i" eV'a! to tEice t>e difference betEeen it" diKit". ?>at i" t>e
n'mberT
a) 36 b) 45 c) 2$ d) $4

You might also like