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

<,:--

__
-CCrl-"\
I_I_2nd mid CP

: L A is a place :on the disk-where a group ofre1ated data-is stored. :->fiIe
2. Basic operations performed on files is/are :->opening, reading and closing
to :->rea.&::tntegeE:fEonca::fiL
. - . ___
f2l2:
en
Q=ls usecr:to \ __
6. What does *fp in<J,i.\;. ?:->fp as a POln.teftoaatatype FIL
7 he mode_r :s.used fikfoL ' '- "
8. The mode a IS use<\.t,qmpenJa file for - ' :->addmg data
9. The mode w+ is US 'a' for operations.: ->reading and writing
10. If a is opened in read mode then occurs.:->Error
11. Standard i/o are :->fopcnO,getwO,rewiudO
12. When end O'f file is reached getcO retUlTIS :->EOF
13. The func&n putcO is used for purpose:-> write a character
-+---___14 _._T_he fu)' jn fPrintf() is used for :->fiJe ___ _.___
l;-- S o .-; ->f co f-au'dferror -----__' . _' _ _ ---.,.. ___
-.-16. hicll.Q[the followin.g is an
1 he feofO ['unction is used to test ' _condition:->cQ(LoLfile
feof(trefUf11S anOl1-zero integervalue-i .->all-tlre-da-ta' Ira-s-b'een read
_0 -19. Thefe11'orOful1ction is used - . . of file
20. ferrorO takes . , as pomter ' _______
21. If an error is detected by feriorO;thei1 it returns :->noll zero ill tcger
22. fopenO returns , value when file ean't be opcned using [opertO.:->NULL
23. fseek(tp,OL,l) indicates ! :->stays nt cllrrent position
24. fseek(fp,-m,l) indi cates :->Go backward by m bytes
V:llne \Vh ll-tll e:poin e n >--1
: >reset- tll: os-ii:-io-n-to'SHlPt;::-e-f.-fil-c =r
28. fscekOs used for :->sets the positlou to d sired point in 'file . .
29. getc() is u"ed to :->Rcad:1 chal'actcl'
30, To store data in fl file in the econdary m mory is/are needed to 0 '.: - Filename, Data
---,.-Stnrclurc, urposc
31 , A File is identi fied tl sinp, :-> 'ile cscrip to);'
32. Each Syst om all r ':1 d 0 write l' tum' Ol Int of ___:->No of bytes tl':111S[ l'J' d
33 . ' 11 r. etllrn v :1 1lH; byt es f r 1 cll ll indicnte __ :->En d 91' n file
34. The prototyp(;" [<ILl Sy:; l(:JJ\ c tI l' II" nV'dl nblc ill _ _ Dl .:->syscall s.h
35. 1\ program nn pell fi t n ut ..--.:. n Il1h r 0 ' illcs sil11l11l nl1 <': ol1 ly. :->20
JG, __ fun.cti on i. 1 c1 I' Ull l IV (he iile llan e fl.OLl'l the "le syslem.:->unll nk
37, lsc will tnk,(;l I 0 1111ur II: III _ f llle fll .: - .)l c1Slti ()Jl p cin ecl
38, !":' wind will gOI til u) uin l(; l 11 ck to _ :->I.l c !nuillF.
j
39. 1lJ e in the SlCI lnld Iii J'Ot I ar . J ' j, J b I . : - ' It'jl (l InCr s
40, r il point r i, D]> int 1 (Ii fth bu ' 1', :->Nc.- i l Ul l' c l Ot'
41 II v is il v II'i :lhl 'CCS.i t: 1rlOn 0110111 (; 1' fil e.;-, TIl e ;(10111 1V!l l jj, bIc rcff r ll .O 1vin the c:: tem
47. 11 bil l l h l I ', t l< J red .') {r1 (ic nro . . ; }\ IJ o fi l ed OIl thl; hdn
n
.
13 . 1\ I-He lcl nl ifilld 11 i nn :- l II CI'I I (1.11 '
ii i , I' ell yst' n en ll f : lor \vl'i t'" r tun).i C01i l1t 0 .' , ; - -No of hUs trnnr. fc ' 1' d
45, l ho r (urn vo1u ' 0 byl(f; H: )' ;I In ull indlcll !Ci. _ ;- . ji1 lld of a in
tj. . Til e 1rot ly]l J. (' 1.1 , y' ( II) onl!. nl" tlv.,ilnhl e i ll 1Ii ... 'S lI U" .1l
www.jntuworld.com
www.jntuworld.com
www.jwjobs.net

. 2
48. The library function exit( ) causes an exit from:->the block in which it occurs
49. What is the output of the following program: main () { int x, y; void change (int *, int *); x =
80; change (&x, &y) ; void change (int *, int *) ; printf("%d %d", x, y) ; } void change (mt *a, int
40; Y=
.":b) { int k . k = * a'
,
*a = *b . >fob =
,.
. ,
, ,
k . } '->8040
SO. Which of the following would compute the square ofx in 'C' :->pow (x, 2)
S1. Which of the following is a correctwa)Lof defining a symbolic constant pie in C :->#define pie 3.142
_ .5z::=--1'fie-value-s of'actual arguments on basis:->one to --
name m a program, me pmmty::l-s
hichofthe vat a s . ' . ., -
S4. The header file that m e included at the beginning of a C program to use a library function cos is:
J
=======5-= 5=. in atleast :->one
56. 'C' language allows :->call by value
57. functions are kept in :->string.h
58. The life' of external variables is:->throughoutthe program
59. #direc' must be present :->before the main function
60. H#many values a function can return at a time :->only one
__ _ _ _
_ ...,-._ IS sac __

:->number oJ bits l'-"n ....t""l...,le'---_____--'
register are less than the size of same variable types
-64. When both :ca!iedfiinction-ana-caTIing-nlrtciion aresame;-then-the process is said-to te:- recursion
6S. Recursive functions out 6T'<ier
66. #dcfme PI 3.142 is a kind of:->Preprocessor directive
67. Observe following [unction dechiratioD 'and choose the best answer: int divide (int a, lilt b =.::: ) :
>Variable b will have value 2 ifnotspecified when cnlIihg function
.. that calls itself for its known <! '-> e up ive Func.tion_-=====
6 . -- -eaeclarea- nctlOn with if it doe-s not have any retumt e:->void
7fr-ATguments-of-a-futlctioITs-arc-sepClram-d-WitIr-7Cumnm-(Y=-- --
71. The keyword cndl:->Ends current line and starts a new line in cout statement.
72. 'trings are character anays. The HfstiIidex of it .contnins the null-tenninated ___
73. Variables insidcparenthesis offunctions declarations have _ _ level access:->Local
-::::--:--74:-\Vlwt-crror-wrH-thc-folrowirrg-furrctiurr::giv e-OlrcuJlmjmtiQn?-f
C
irrtfjIll15r{ }_'
7 . Will the followjng [ullction work? fl (iIlt a, int b) { ret11w (f2(20)); } f2 (int a) { return (a * a); } :->Yes
7
6. How many times the following program will print "Jamboree."? #inClude <:: stdio.h > Void mainO {
Pdntf("\n Jambor e"); mainO; } :->TiIl the Stack docsu't o\'crilo,,, .
' 7, h of the followin g is the correct output for the p'rogrnill given below? #inc1ude < stdio.h > Void
mnin() {iut 6m( int); int i:=fun(lO); printf("%d\n",-i) ; } inl flln(int i) {rcl11n1 (i++); } :->9
, i. rf I\ Jl int is 2 bytes wide then whiclLOf the foll gwina js the correct output for the =
mr)clude < rdi o.]! > Void fun( char ','>/;j;VoiCl 111ainO { Char *argv[J= {"ab","cd","cf","gh
"
}; fim(argv);
} r id flln(chnr '" ; t J; pIintf("%s",t); } :->cd
( A'l1ich of the [oll owin< is (h e corrcCTOUlp:'llr 'or the given b < stdro:-lr'2-in -
1=--- ullCi! l); void mAinO ( noal 1\.=3; fun (k- funC1\.IJ1(k))) ; Prin([(,, %f",k); } fun (i11\ i) [ i++; ret1lJll i; }:
5,OUOOOO . .
8. , YlVord used ( 0 (rmisfcr control hom a [unction back to the ealling functi on is :: ->rctllro
1. :t 11 -Jude < stdi .Il . ' Void mainO [ jilt i=3j=4, k,l; k=ilddll1ull(iJ); l:!ilddmult(iJ); printf("\n%d%d",k,l);
lI=i;'jj; bl197>n-t
ev j ' . .
www.jntuworld.com
www.jntuworld.com
www.jwjobs.net
)
;
j " '"
:;:r .
CO",",
82. Which of the following statements are correct about the function given:);below? .long fun(int num) { int
i; long f=1; for(i=l ;i<=num;i++) f=f*i; retl)m(f); } ;..>The function caibIlates the factorial value of
. . .
aI1.l.nteger, .. - . .. . ' Ii . . . . ... . .
83. WhICh IS correct output tpfthe gIven be{9;V? #mclude < stdI.O.h > #define
SQR(x) (x"'x) vOIcLmamO .{.mLa, b=3 ' (b+2); pnntf( } :->11_ . .. ... .. .
84. Which of the foilowlITg1s--tlieco ect- ut fOr"the program given
.
%f -- :-'
85. b-=-.the .. program? #include < stdio.h FUN(i ,j-) i##jvoid .
mamO { mt. val';i = -Ofint-v 2=-2
86. What will be th ou following program? itinclude < stdio.h >,-:'#define ,y)(( x ( y )
? (x) : (y); Voi ainO{ int i=1 OJ,k; j=5; k=0; k=MAN (++i,jrt+); printf("%d%d%d",ij,k); } :->12:
612 . , . .. . .
87. What will output of the following program? #include < stdio.h >#dcfine FUN( .arg) do\ {\ If(. .
arg li("Have fun&","\n");\ }while(i--) Void maiaO {int i=2; FUN (iHave fnn& Have fun&
Havt3.fl.n& I'"
1-,--___ the following typedewQI'k'Ltypede'#include 1; :->No - .,.t:----. _______
89.Winit result intoan error twice. ::> ----
-- }
= \f!1. maillO { Errdr: _if
92. #define square(x) x*x mainO {int i; i = r"':-- :_-;;::" . -------- 64/square(4); printf("%d",i); J..,. >ri-
ifinclude-< stclio.h > #define a 10 mainO ;:->50
t====- 94. JfoCilile--clrscrO 100 'mainO { clrscrO; ..
95. #define f( g,g2) g##g2 mainO {inl varl2=100; print1{"%d",f(var,12));); :[>100
J
96. mainO { showO; } void showO { printf("I'm the greatest
li
); } :->Compper error
97. maiuO { m;\in(); } :->Run time error: StackOvdfi'lov,r , .,/ .
98. int i=10; maiuOJ u1U;.J int "olutile ull signed
--j-
prmtf("%d",i); } pnnff(H%-d";t);-} - . - '
-:-Ili ne tide < stdi-o .h Fcl1a-r-jF.: =-lIl1ell o" j
100. if inclu Ie < stdio.h > aaaO {printfC'hi"); } bbbO ( j>r1ntWhelIo'g); } cccO {printf("byc
li
); }
mainO {inl (*ptr(3])O; ptr[O]= MU; ptr[l J=bbh; ptr[2}:::ccc; ptr[2]O; ) P d nts bye
101. m.aillO { int i; i =nbcO; printW%dli;i) ' } abeO {_AX :: 1000; ,) >>1000
10:2 . l::1 i O; _ }:f__ _
103. void m.ainO{ static int j ..S; moinO; print[(Ii%d li ,i) ; } -'-
lOt!, void III inO {jnt LClfc t(sizeo[(floll t)); prinlf(,'\n h(; re Vi l[lI (.; j .. %'d
ll
,++k); } jilt rctCint ret) {ret += .
2.S; rcturn(rct); } '
, II
105.' NdCliilL: prl(n,L) mainO (int x- 3,y=4;;'J)1 Il.IlfC'%dil, procl( ) : >10. .
JOG. WJI al will prinl if foll owillg ell.: i xew(c<! . 1I or'l JJ\ /,hmc (d Ull' *plr) { Ptr+=3; rctllITl (ptr); }
ill t maillO { ,!nr .(}lIIy;: _ HELLO ; y-n1yfiunc (x); Y"" S); rctLl m 0; } :->Lo
I===:.J 7, mninO {v id tiwnpO' in t ' IOIy-8; swop( 'IX, >"y); printf("x- %u y=%cl'\x, y); } void swap(int
I , inl *b) { Ii i 1\. 1\. w;o, II i\ *G;} :->l O8
-- W li II will Uf.l ([1<.: QUI til [ Iho 01l 0w;0 . Jl t ,l'111117 iii Cl\ldo tldctin tv. " 8 ' Junk Void mainO (
L'= ; ) :>M, \$, t..:>J- . eh..o.rnSCl Q;,'IdQO -Corn ---::===== II
lOS). WJ nl " jU c ut i III orfoll yin I ]l l' ,I' j 17 ifill I\l de < tHdlo:h ",' VOlrl l;JiI10 { illl fl =320;
"' J tr; plr ( (;JII II 1/ r l/(li p I' Il lfCi!ltJcI r elchO' } :-, q I

110. \VII .1IviJ l be til) 1( 0 'olt wing stdlo.h,ft.ffhlclude v ld Ill fliI 10{ ,\Ioid
il l l " :(I)(); Jl d [')0 ' 1, 0/1',. 1'; I I pu( :>; ('li p)(); II "); (llIq)O; ) :->Hello
1) 1. WJ1 :il wi ll be l lf] ul 0 . lJ owil1g pI' I \rt lll l? If. h1Oiud / ' 1 cinO{int i "'" 3; int int
oj *k; j C'I j ' I- 'J' prh 'II li % \1 %u Yo I \I k); } '.";' durcll) I "s, :3
$-trJ'0t0- j
@. lei't fo
i :
www.jntuworld.com
www.jntuworld.com
www.jwjobs.net
'1 }.
k "".., . eIAQh1S 0. Jkb I if(l-poi- .('0"" . . . \ .
112. What will be outpal of following program? #incIuclc < stdio.h > void mainO{ char far *p =(chal\
far *)Ox55550005; char fqr- *q =(char far *)Ox53332225; *p = 80; (*p)++; printf("%d",*q); getchO; }:- ..,
>81 . ;i
113. What will be otitpllt of following program? #indude < stdio.h > 14incIude vciici mainO{ char ..
*ptrl = NULL; char 7' 0; strcpy(ptrl," e"); strcpy(ptr2,"questio lS"); printf("\n%s %s",ptrl,ptr2);
getchO;} :->{uuII) (null)!::; cr '
114. program? #inchi huge- *a =(int
__ *)0;<59980Jtlc.1Pf(1E=---Ir): .
.. _. _ - -power of pom tcr: _
115. at will be<> " !lowing program? #in#include < stCIio. ::>1fin#include voivoid mainO {
- reglst.C4 - a;-printf("%d";*p); ge chO;-F->OmpIlafron -error
, 116. VVIiat 'will be 0 following program? #inc1ude < stdio.li > #include void mainO { char far '
*p,*q; getchO; } :->42 .
117. . What 08tbe ?utputtoffollowing program? #inc1ude < stdio.h > void mainO{ int a = 10; void *p
= &a; l11t *.l;Ptp' p; pnIitf("%u",*ptr); getchO; } :->10
118. be outp4tof following program? #inc1ude < stdio.h > #include void mainO{ int
printf("%d",a); EP.1:ch(); } Ilifa=25 :->CompHati.on errOr ' .
- 1-1 {- char arr LQJ; arr-=--,
"wp ge.tchO; } :->CompiIation etror '
rnainEH int .
,..?_, := Celiar *q =_( int floaf*r = ( (logale = _
_ V_ mt)iq+l); = (mt)(r+1); d:;: _(mt)(s+l); pf!nlff'o/9 %d %d %d",a,b,c,d; :->1 2 !L '
- - '1'2"1. ViThat will beou1put :of mainO { int -a :====:===
ro;-c;lnt *p = &a,*q'';' c = p - q; priritf(!!2loo" , -c)ITetcn(-TF}7-:>-l- - - ,-
122. What will be outpl1,t of following program? #inc1ude < stdio.h > unsigned long jnt (* avg()) [31 {
_ static {I ,2,3}; retum &arr; } void mainO { ptf =
avgO; pnnU("%d" , :l'(*ptr+2)); getchO; } :->3 COM
123. _ _ WhaLwiILbc_o].ltputoffollowing program? _> y'QidmaLn(). iut i = 5 , j; int *p
__---', p = &i; = "value of i : %dv,1Iue ofj : % " p, 'q ; getch; :->
- 12"4-. -, "--w:o:a-t wHY upllrorfollowl:ITg- progrmn?-iliuclude <- sMio-:-Ir>-voi=ilmain(tfint-r-= 5 ;-int->t.
1
);
=&i; printf(" %u %u", *&p , &*p); getchO; } :->Addtcss Address
) 25. _ What will be out})llt 'of folIO\ving program? llinc1nde <: stdio.h > YQid mainO { int i = 100; ____
pr intfC'valuc ofi: %d addiesss ofi: %u",i,&i); i++; printf("\nvalue ofi: %d addresss ofi: %u",i,&i);
-;:-------...- "C"XnclIC)::'}:: YHtuc ott: :l.o(l1(d"mITs, ar.r-:--A(tdrcss YaLrr.c_otj-':-101::::.adcl-csss..::. ori-:=-Addrcss-
126. v.'h.at will be outpufof following program? #include < stdio.h > voidmainO { int I = 3; int *j; int
j - &i; k = &j; printfC'%u %u %u",i,j,k); } :->3 Addrcss Addn.:ss ,
127. statement lnt ; :->is syntactically and scrnanticnlly correct .
128. C Jnsidcr the declaration, int a, = &a, **c :0= &b ; The following program fra gment
fl 4 ; * * c "" 5 ; ;-;>assi gns 5 to a '
129. If the statement b >=: (int *) ** c ; is appended to the following program fragment, then Consider
(lH::d'oll ow:inn declaration, iut a, *b =&:1, **c =&b ; The g_I2rogrilln fra gment 11 = 4 ; * c "'" 5 ;
:- vnlue of ubecomes 5 - -.- -
1" () , stn l.i u dI ll!" weI' [3] [4] ::::: { " bag, ", "let" , "bud" possibJe output of
%d" , p tr, ptr-!l);' is:->262 266 __ -'"
13 1, stati c; d ial' wer [3] = { "b;J g", "let", "bud"} ; ,hnr C'p(r) [4] "" \yer; The possible OUlpllt 0
I 'il tf (" %(l %d",wcr [1 ],i \/ er [1] -)-1); is :->1.62 163 /' ,
1. ':'2. tali . ,J :.:l J' wcr == { "bfloD_", "let", "bud"} ; C]lil l' Cp(r) [4] :::: weI'; T}lef.j .ssible output of .
I'l tf (" %d %<1", W CI', wcr + 1) ; is :->262 266 e k..QK'\sa.dJa. 6 0 ot .co"",
13 I . static dWl wcr [3) [4J = { "bag", "l et", "bud"} ; char (*ptr) [4] = wer; pute ,ar (*wer [IJ +1 ))
;:-. pd 1. ( s .
Jo ' ?<tai<a.!}(
@ /cl9 j 0. Jj 0.. .
www.jntuworld.com
www.jntuworld.com
www.jwjobs.net
,;'

134. static char wer [3J [4J = { " bag", "let", "bud"} ; char (*ptr) [4Ji;T wer; In which Qfthe following
cases will the character 't' be printed? i. putchar (*(*(ptr +.1) + 2 ; Wputchar (*(wer [11+ 2 ; iii.
- 'i"; ' - - >-.
s ___memoTY
vanaoles can ha thH ame add ess. Ul.... Address the
- - e an address--:-- l -&=IV -;- /
_ - - ;r';' T , - - --- - -. FE riable tIu'ough its adCifes-- i I-byreference can_
_ be I n be can retur;rti mOre dum one value iv. _
__g -al-v - can be aVO!aea :->1, III & IV -=='
137. --rfx IS an array integer, then the value of & x [i] is same as that of:->x + i
138. . .Pick the If x is. one arraY':.th.e?!:i &x [i] is x - 1 ii. *'
(x + 1) IS same'& (&x[l}) * (x + 1) IS as x [1] IV. *(x + as * x + 1.:->n & III
139. Let x array. WhIch of the followmg cannot be present 111 :tJie left hand sIde of an
assigrune11A*atement? i. x ii. x + i iii. * (x + i) iv. & x [ i ] :->i, ii & NI - _
140. &:-t t -; be an array. Which of the following operations are illegai\i? i. ++ x ii. x + i iii. x ++ iv. x *
2 :->-ijnj-&-i - - - ::-"1' -- . . -. - -
141 . COl1siderthe-dec1aratimrcIfaf)( [ J-=-"WHATIZIT" ; char *y 'IIZITOI;F-ick-=-tlie cori:ecr---
(x)"rtno puts- (y) will W t esrfIfie " --1
- .COilS! e:' t ec first floRt)_};..int which-ofthe -1
YfoI1owmg fUnctIOn mvocatlOll IS vahd ? :-=?>fn'st (second) ; -- - ; I'
_ 143. The declnrntion:int-(":p)t5] ; means _:->p is :l pointer to a5 lliteger-nl'la .. =
144. Consider the twodecJarations void *voidPtr ; char *.charPtr; \:\';hkh ofthe-fo119\'{ing-- _ _ __.L
assignments are syntactically correct? :->voidPtr = charPtr ' ':; - . I
145. Which of the following operntors can be to pointer vadilbles(s) ?:->Casting i
146. The statement int **a; synta ctically and semantically i
147. consider the-followingaeClanrt-ion. tnt;1, *b = &0) ___
-,..----_a - 4; 'c := 5 ; 5 to a rJ ---=r-
1-48-.-- ffine :;tatemefi(" -- tiTIc*) *:1- Ci tf( the n ove pro,gtam . ragment, 'len :->value of b I
becomes 5 . }--;":'I'- ' co . - ,
149. con ider the following decl aration (nlie ell nr weI' [3] .,. { ': "let", "b-ud"} ; char (*p11)
l4] !:: weI' ; The possible outP1..1t of prilltf ("%d %0", jill', plt 'H)j is' 266 -- -- i
-;;.---t50. CQITSi-dCr:ilIJ 1 \. ' lg::dcc ara tionsla1'1c .c.bor --r' 11ru,-( 7'J *ptr) P '; C- - ----==-::-r
[4) - wcr ; The possible output ofprintf("%d %(\", wer [1), WCl' [1] , ' 1); is :->162 163 ., - -
JSI. - consi der the following loclur (i 0 1l 5l:1 tf C clWI' \' 01' [ J(4J c {'Ifl.lag" "1 t" , ilbU \"} ; char C'plr) !
[(IJ Wvt' ; The possibl e O\lt},ut of pdll lf (" %<1 % 11/ , WCI', wcr 1 J) . is;Lib] :->262266
15? COll the foll owing declara ti on s(n(i c bur WI T [3] [;IJ {1I 'yag", I/l <.; t", "bud"} '; (*ptr)
I . wcr ; II I ossiblc" O-] (p \ll of p1..l tcll nr W ,. [J] 1 J ) ) ; :->prln(s ./
153.coJl eidcr tl1G [0110 V Xl II f' "" r [3J [4J C! bog
i
' "let", "bwJ"} ; char (*ptr)
w r ; II whi h f tho ollowinn 11:1" wi ll Ihv(; /) nJ'. clef iI' be p tll,l cd ? i. JJt1tchor (*('I' Q,tr -I- 1) + 2
)) , i i. ptl tchfl l ( '("I
l
er [ J-I- 2))' il1. \'lloharCIl t. -1 ; 1) 12); lv, none! f tl l ' nbov :..>i &-n
L If, Choose co t t I'l eDt:':. i, Addr ss is fi ll; IIltll1 tlrl C v cini (1 wit lJ nme no ' i
J c ' wo v rl u, \l 11 \ " I; tll'le Hlrlrcs . iii . AdJ j U1.1 , -.!- ! ttl H Vf _=
(' 1111 l i c i. IV, Vrll ll r;, I . II vad ble elJl ) 1\.! 1111 Idel ro,.,;. :->1& I" 'ffO'F
1 Fll'i[lIl" D j' Hoc-e" iJljJ CI I 1'l lhJ o 1111' Hr.li it s " ,I 11' Il !; ill luJ d' l ILWi.) i. by l' cfcl'cuce c n
h - ,.lwll lrd,"tl ii , c 11 y V 11tl tJ C n b j J1 lli lt ... cl iii. (I /,\mctioJ1 COB I' \l or 111111' va lLi ' tV, '
",x, It ,t; rglobttl VlJ' l lbJ c" Of! I 0 ovoi dll(/ Whi ch al tho II vc. 11 1; is ' OlPot :->1, 1ii & iv
15 . 1) li ,t !l.1' e 1S d OJ' 01'1" Y \tb ,Orl lJ( ' bu ' 111 ' 1' (hoy :-> t' I'll. ( l'
t S7. If p) : I jl in to!' I() t1 e Cl l'I' y t ) c\ 1i 1 , 1 ,- !luI C ( n .' ( '11; lit of OlO 1'I' :1y
, 58. OUql \l{ 0,- thl;' pr rI'll \. 11111 III ) {in! I 5; p l'int 11'0(.) l%cl%c1%d%c1%c1 ")i-r+ i-)-H-i,
@: .? ::,
_----' <3
www.jntuworld.com
www.jntuworld.com
www.jwjobs.net
C\ bQaJ<;fot
159. Output of the is __ void mainO { int const *p=5; printf("%d",++(*p)); } :
>Compilcr error.
160. Output of the progmm is __ . mainO { char *str1="abcd"; char str2[]="abcd"; printf("%d %d
;-.>255
161. -- A given pointer cafl,poi11t td_types:->M211Y
- .162. In this program dp:is ___pointer char *dp = NULL; { char c; dp = &c; } :->DangIing
-==J6-3:-- - The-&-operator cap be to- _ .;;.> .
. _ ;- __ __

!lG-f ml'm:t::the vanab1e "ptr{!? .:. net'
How ';i1l mem<:YlY'? _ -
_ R)i . . -uruon.and_enumeratlOn?:->A11 of them Jet you
---- define new data 0 \\: ___ - - ==-========
167. What will be,.(lJfe Ol!(put of the program? #include < stdio.h > int mainO {union a {int i; char
ch[2]; }; UlUO aeo; u.ch[1]=2; printfC'%d, %d, %d\n", u.ch[O], u.ch[l], u.i); return 0; } :->3,
2, 515 't- i_, _ _
168.. Vfbt*will be the .ofthe progral!1 ? #include < stdio.h > int mainO {union var { int a, b; };
UlHon v.a=10; v.b=2p; pnntf("%d\n", v.a); return 0; } :->20 _
olrtpuf __ < > int mainO { sttuct value { int _
bi@ :L; J.n.t blU.;.4;mt blt;.2rmtf("%d\n", - _ _
o.ftheprogt'am ? #incIude int main(rrcnum aays rrvrON=--
_ _ -,-lI-_-=-- l, TVE-;-VvED=6, THU, SAl'}.;-printf("%d,YoQ,%cnYo- , %a70/0d\n", MON,
, -, FRI SAT)' return O} ',->-1 0- 6- 7- 8:9 . -- --- - .-- --
V ' , , . . --. "",
- 171. Wha.L\'{iIl be theioulQut ? #include < stdio,h > int mai.nO { enum status {pass,
- - - - fail, absent}; erliIm s 'a us sTIrdr;s rud2;-stud3; stUdl-';::pass; stud2 = -3 sent-FStu
%d\n", studl, st11d2;-stu(3);!retqrnO"FF '::'>O, 2,1
172, Wha t will be the output of the program? #include < stdio.h > int mainO { i.i.-!c-i=4, j=8;
. 0/ 1 0/ 'L" u '" 'I' .,. (> '1' .".\ O} 12 1" 1''}
prUJ.t.l i(), ;roC, IvQ\il', 1 -J", 1U<.":J;, 1 J); retunl ; _ :-> ." -.1<, (..
'Alhat will be the output of the program? #inc1udc < stdio.h > int mai.nO { struct emp { char *h;
_- _ }, el-=7f-'-'-Dravid; pri!.ltf("%s.\n", eJ.n); return -2,; 1:ptnrc
fJ;=-}-:-;;;> I{A=- VI co",",
174. What will be the output of the program? ffinclude < mainC) -{ stmctnode- -mt- at-a; .
struct node }; struct node *p, *q; p = (stl11ct node *) maUoc(sizeof(struct llode));q = (struCLllo.de-'-____
malloc(sizeof(struetnoae)); printfC'%d, %d\n", sizeof(p), sizeof(q)l;fetuUl O;} :->2;2
_ \hat-wil be-lhc-Qutpllt f lhe )foo.,ram ? if/include < stdio.h > int mainO { s(mct bytCl illt
one:1; }; struct byte vnr -;; printf("%d\n", :-=>.::::
1. 7G, What will be the OU'i}mt of the program? #include < stdio.h > int mainO { enum days {MON=-
J, TUB, \YED=6, THU, FRl, SAT}; printf{"%cl, %cl, %d, %d, %d,%d\n", ++MON, TUE, WED, THU,
'RI, I AT); retumO;} :->gn-ol', ' ,
] 77. What will be [he ,otilput of the program? #includc < stdio.h > strucl course { int courseno; char
intmainO {structcou'rsec[] = {{l02, "Java"}, {103, "PHP"}, {i04, "DotNet"}};
r intf("%c1", c[l].courseno); printf("%sUll1, (*(c+2).coursename); return 0; } :->103 Dotnct
1'7 Wbn! will b0 thc oU..timt-o} the ? tfiucluck < stdio,h > iut mainO {e.= m:::, l1,:::: ll,:-=__
v;'dll c {VAU =O, VAL2, '.tAU , VAL4, VJ\L5} \'(lr; priJltL("%d\I1", siz(OQf(var)); return 0; --::/ 2-=- =- --
17 r oi l'l l Cl1Jt (;: l l'O" !ii llll ? slruc t emp { inl ecocle; struct Clllj2 ,! :;J .; ;-> 1\'0 Ert:or
l ' r) : fai nl out the the-pI:QPrn l1 ? tYl cd ef strllct data my slfuc[' in X;. ,IYSII .
; :->No 'l'l ' or ,; elAo.lY'\so.. ddQ.. co"'" . ,
,I 1. Point out the crrol' .in:the pr t/include. < slcjio.h > int moine)' { Slalct a {c.ategory:5; .
L(:J1t',l l l e:iJ; }; size. [(Slil.lct a; retum 0; } :->Error: bit field type lllllst be signe d int
[' Itllsi gned jut
J
oint out [he error in, the program? struet CTnp { int ecodc; struct ClUp e; }; :->Error: ill
" (r ctm"c de laratioll :
eJ -A-ci':jc. f
@ .p
www.jntuworld.com
www.jntuworld.com
www.jwjobs.net

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