You are on page 1of 5

C 1.

The C language terminator is (a) semicolon (b) Colon (c) period (d) exclamation mark

programming

2. What is false about the following -- compound statement is (a) set of simple statements (b) !emarcated on either side b" curl" brackets (c) Can be used in place of simple statement (d) A C function is not a compound statement. #. What is true about the following C $unctions (a) Need not return any value (b) %hould alwa"s return an integer (c) %hould alwa"s return a float (d) %hould alwa"s return more than one &alue '. (ain must be written as (a) The first function in the program (b) %econd function in the program (c) )ast function in the program (d) Any where in the program *. Which of the following about automatic &ariables within a function is incorrect+ (a) ,ts t"pe must be declared before using the &ariable (b) The" are local (c) The" are not initiali-ed to -ero (d) They are global .. Write one statement e/ui&alent to the following two statements0 x1s/r(a)2 return(x)2 Choose from one of the alternati&es (a) return(s r(a))! (b) printf(3s/r(a)3)2 (c) return(a4a4a)2 (d) printf(35d36s/r(a))2 7. Which of the following about the C comments is incorrect+ (a) Comments can go o&er multiple lines (b) Comments can start an" where in the line (c) line can contain comments with out an" language statements (d) Comments can occur within comments

8. What is the &alue of " in the following code+ x172 "192 if(x1.) "172 else "112 (a) " (b) 9 (c) 1 (d) . :. Which of the following represents true statement either x is in the range of 19 and *9 or " is -ero (a) # $% &' (( # )% *' ++ y % % ' (b) x;*9 (c) "<119 == x>1*9 (d) ?one of these 19. Which of the following is not an infinite loop + (a) while(1)@A ....B (b) for(22)A...B (c) x192 doA C4x unaltered within the loop4C .....Bwhile(x 1 1 9)2 (d) , define T-./ ' ... while(T-./)0 ....1 11. main() A int c 1 --22 printf(3c 1 5d@n36c)2 B Ans2 error or lvalue error 12. main() A int i 1 92D 1 92 if(1 == DEE) printf(35d..5d36iEE6D)2 printf(35d..5d36i6D)2 B Ans2 '..&

1#. main() A int i 1 -16D 1 -16k 1 96l 1 26m2 m 1 iEE == DEE == kEE FF lEE2 printf(35d 5d 5d 5d36i6D6k6l)2 B Ans2 ''&3 1'. G define a 19 main() A G define a *9 printf(35d@n36a)2 B Ans2 *' 1*. main() A char pHI 1 JKelloL2 strcp"(p 6LWorldL)2 puts(p)2 B Ans2 4orld 1.. main() A char strH1*I 1 3Kello32 char 4 const p 1 str2 strcp"(p6 3World3)2 puts(p)2 B Ans2 4orld 17. main() A float a11.9C#.94#2 printf(35f@n36a)2 B Ans2 &.'

18. main() A int x 1 *6 " 1 -196 -2 int a 1 '6 b 1 22 - 1 xEE E EE" 4 b C a2 printf(35d@n36-)2 B Ans2 & 1:. main() A char 4p 1 JMlxsiL2 strcp"(p 6LT T L)2 puts(p)2 B Ans 2 /rror 5fault segmentation fault 29. main(int argc6 char 44arg&) A printf(35d@n36sum(arg&H1I 6 arg&H2I))2 B sum(int num16 int num2) A return num1 E num22 B Ans 2 error 21. main() A char c 1 26 x6 "2 x 1 c >> 72 printf(3x 1 5d@n36x)2 " 1 c ;; 72 printf(3" 1 5d@n36")2 B Ans 2' ' 22. static int i 2

main() A printf(35d@n36i--)2 if(i) main()2 B ' 5 6&5 7..& 2#. union sample A int x2 char "2 struct test A char x6 "2 int x"2 Bp2 B/2 Ans2 8 main() A printf(3si-e of union is 5d@n36si-eof(/))2 printf(3si-e of struct is 5d@n36si-eof(/.p))2 B NO main() A const int i 1 *2 int 4p2 printf(35d@n36 i)2 i 1 292 p 1 =i2 printf(35d 5d@n364p6 i)2 B Ans2 /rror 9- warning

2'. )ist the five areas where !ata structure is used with appropriate example 29 nodes has Q#2QQQQQQQ null nodes

Pinar" tree with

2*. Construct an expression tree for the following ,nfix expression a E b 4(c R d) Ce.

You might also like