100 c interview questions answers - Pdf 16

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 digits 4.
ans: (b)
5.

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:
;;; doesnot matter. This indicates only an empty statement.
The o/p will be 3,1.

13.

ans: (b) 14.

st.. i.e. 0.
This is false value for IF st.. and hence else part is
executed. 18.
ans: (c)

reason:
t1 is an array. So you need to specify the subscript value
while
you assign any element to it.
char *t1; t1="craft" is correct since *t1 is a pointer and it
points
to the starting addr.. of the craft. 19.
ans: (b).

unsolved 20.
ans: (b)
21.
ans: (a)


27.

ans: (a) 28.
ans: (b) 29.
ans: (a)

30.
ans:(c) 31.
ans: (d) 32.
ans: (e)

reason: incompatiable type conversions 33.
ans: (c)


36.
ans: (b)

reason:
'%c' mainly used for print one charactor
We can't specify formate output within '%c' 37.
ans: (b)

reason:
can not modify constant value .
It is a fixed value for entire program. 38.
ans: (b)

reason:
'argc' holds number of arguments.
argc consist always value 1 becase file name is one of the
input .
therefore 1<1 gives false whereas 1==1 gives true.


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status