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

1. ans: (a) reason: you cannot declare structure as unsized array. 2. ans: (b) reason: The return st..

returns x value first as it is and then decrements its value. Its post decrement. 3. ans: (e) reason: p represents the pointer format specifier. It prints the value in hexa decimal upto four di!its ". ans: (b)

#. ans: (b) reason: The values in the if st.. () is said to be in the stac$. %o the last element in the stac$ is ta$en as chec$ value(zero&non'zero). (ere T)*+ is '1 i.e. success stateand x,y is printed. -. &. *nsolved.&

/. ans: (c) reason: %tatic initializes all to 0. 1.

ans: (b) reason: char pointer size 2 1 int pointer size 2 2 3. ans: (d) reason: 10. ans: (c) reason: printf returns the total no.. of characters it prints on the screen. 11. ans: (c) unsolved.& 12. reason: 444 doesnot matter. This indicates only an empty statement. The o&p 5ill be 361. 13. ans: (b) 1". ans: (d) reason: The puts prints and places the cursor in the next line6 5hereas the printf prints and places the cursor in the same line. 1#. ans: (c) reason: 7ou need to put 828 si!n at sho5. ie the correct st.. is end2(char.)(sho52(char.)strcpy(start69:I%;I%69))4 or else expression error.

1-. ans: (e) reason: The <fastcall $ey5ord is reserved for pro!rammin! under =indo5s and >%&2. 1/. ans: (a) reason: The strcmp returns 0 if zone22tar!et6 If 0 the ?: assi!ns fail st.. i.e. 0. This is false value for I@ st.. and hence else part is executed. 11. ans: (c) reason: t1 is an array. %o you need to specify the subscript value 5hile you assi!n any element to it. char .t14 t129craft9 is correct since .t1 is a pointer and it points to the startin! addr.. of the craft. 13. ans: (b). unsolved 20. ans: (b)

21. ans: (a) reason: Its a static array. 22. ans: (b)

unsolved 23. ans : (a)

2". ans: (d) 2#. ans: (c) reason: c, ,100 is not valid as c2c,100 2-. ans: (d) 2/. ans: (a) 21. ans: (b) 23. ans: (a) 30. ans:(c) 31. ans: (d) 32. ans: (e) reason: incompatiable type conversions 33. ans: (c) reason: odd no.. ABC 5ith 1 !ives T)*+ value al5ays.

3". ans: (b) reason: if 5e mention the strin! as t5o dimentional(for more than one dim) array 5ith in printf statement6then 5e should !ive 8D8symbol 3#. ans: (b) reason: res20,1&#4 res21&#,1&"4 res21&#,1&",1&34 .... res21&#,1&",1&3,1&2,1&14 At last time res21&#,1&",1&3,1&2,1&1,1&04 E F zero divide occur

3-. ans:

(b)

reason: 8 c8 mainly used for print one charactor =e can8t specify formate output 5ithin 8 c8 3/. ans: (b) reason: can not modify constant value . It is a fixed value for entire pro!ram. 31. ans: (b) reason: 8ar!c8 holds number of ar!uments. ar!c consist al5ays value 1 becase file name is one of the input . therefore 1G1 !ives false 5hereas 1221 !ives true.

33. ans: (a) reason: follo5ed by non'format specifier is printed as such 5ith symbol "0. ans : (b) reason: if no format specifier is !iven immediately after the first appearance of then the characters after the are printed as such "1. ans: (d) reason: the scanf must have Dx6Dy for "2. ans: (a) reason: In if statement6 x2- is assi!ned and not chec$ed. "3. ans: (d) reason: self "". ans: (a) reason: ,ve "#. ans: (a) reason: self "-. ans: (e) reason: unsolved odometer principle6 since a is unsi!ned it is al5ays d format specifiers.

"/. ans: (c) reason: x 5ill contain the !arba!e value hence default

"1. ans: (b) reason: x 5ill contain the !arba!e value hence default

"3. ans: (b) reason: self #0. ans: (b) reason: self #1. ans: (b) reason: recursive function #2. ans: (d) reason: t is a pointer and memory allocation is not needed for that. #3. ans: (a) reason: +ach 0 bit in the operand is set to 16 and each 1 bit in the operand is set to 0 if 5e use H #". ans: (c) reason: int x:1 5ill !et only first 1 bits assi!ned to it ie.6 1 byte of size

int x:3 5ill !et only first 3 bits assi!ned to it ie.6 2 byte of size 1 2 3 " # - / 1 x : 1 x : 3 3 10 11 12 13 1" 1# 1-

a a a a a a a a n n n n n n n n a a a a a a a a a n n n n n n n ''''''''''''''' '''''''''''''''''''''' 1 byte 1 byte

##. ans: (e) reason: #-. ans: (b) reason: self #/. ans: (d) reason: self

#1. ans: (a) reason: can8t understand #3. ans: (b) reason: self -0. ans: (c) reason: -1. ans: (1)

reason: self -2. ans: (b) -3. ans: (c) -". ans: (a) -#. ans:(c) --. ans: (f) -/. ans: (b) reason : if you !ive int main() it !oes to infinite loop. -1. ans: (d) -3. ans: (b) /0. ans: (b) /1. ans: (c) /2. ans: (e) /3. ans: (b) reason: if name is !iven the output is hai

/". ans: (a) /#. ans: (b)

/-. ans: (a) //. ans:

(c)

/1. ans: (c) /3. ans: (a) 10. ans: (a) 11.

12. ans: (d) reason : pointers cannot be added 13. ans: (d) 1". ans: (b) reason: stac$ concept 1#. ans: (b)

1-. ans: (a) 1/. ans: (c) 11. ans: (c) 13. ans: (a) 30. ans: (a) 31. 32. 33. ans:(c) 3". ans: (d) reason: messa!eIJ is correct 3#. ans: (c) reason: static is not allo5ed in main(..). If removed6 Kun$ value. 3-. ans: (a) reason: self 3/.

ans: (b) reason: 31. ans: (a) 33. ans: (b) reason: 100. ans: (c) reason: .< is an allo5ed variable

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