You are on page 1of 17
618723, 1:25 PM (C-Test-24meqst 85: Attempt review Home 1 My-courses 1 General f Celest-2amens gg Started on Saturday, 3 June 2023, 832 AM State Finished Completed on Saturday, 3 June 2023, 8:54 AM Time taken 22 mins 4 secs Marks. 40,00/40.00, Grade 100,00 out of 100.00 cveston 1 What wll be the output of the folowing program? sincludecstdioh> int fui return main) int fungndy inti=3 funttun() print return 0; fan Select one ror "7 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review cuesion What wl be the output of the folowing C program? finchidestdioh> int maing ‘ ital) = (5,3, 15, 20, 25); int jm eat is allies: m= alie+l printf%60, 9, he 1, my return 0; Select one 125 2,3,20 2415 5.4.25 What does a logical operator return fora true condition? Select one 2 1 3 anv 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review uesion Which ofthe following isthe correct syntax to declare a string? Select one char namesit0} char namesi0 ames char char names What wll be the eutput of the folowing program? Sincludesstdioh> ine X=40; int maing Select one ° 40 20 Which ofthe following special symbols is allowed ina variable name? Select one (colon) = (ryphen) —[underscore} Iieipe) htpssontinetest spoker-tutrialorgimod/quzireview.php?attempl=20897528emi snr 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review vesion 7 Which ofthe folowing format specifiers is used to provide exactly 4 digits ater decimal point? Select one wat cnenon B comple \What willbe the eutput of the folowing program? include cstdioh> int maing inta=T; 1a%6) printiciy: else printiHello" return 0; Select one Hello 4 Hi Hello None of these anr 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review cvesion 9 What isthe output ofthe following program? includecstdioh> int mind ‘ imeats) = @. 3 printf, hd," a2. 3], af return 0; Select one: Compilation eror 322 00,0 233 vesion 10 arc 0 out of 100 Which one of the following statements is correct? Select one: stremp(s, 52) returns a number less than 0 i st>s2 stremp(t, 52) returns 0 ifs1==52 stremp(s, $2) returns 1 if's1==52 stremp(t, 52} returns a number greater than Of st int maing ‘ static char s25) intiso, char es chaste rite ey che slit) print, che live Select one hel al cvaiion 12 (C-Test24meqs+ 895: Attempt review Observe the fellowing function declaration and choose the best answer Int divide (int a int b= 2) Select one Variable bis global and will have value 2 Variable 9 and b are of type int and the intial value of both the variables is 2 Variable b will have value 2, unless specified while calling the function Variable bis of integer type and will abays have value 2 en7 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review cussion 13 What wll be output ofthe following ¢ program? Sincludecstdioh> intaye=10 int maing( intay2=20; printed" x92 return 0: Select one: a 30 b. Compton Error 20 1. None ofthese cussion 14 What willbe the eutput of the folowing program? Sinclude int maing char str(]="-program inta=5; printfa >107"95"9%5, st return 0 Select one Error Ps program None of above htpssontinetest spoken-tutoralorgimod/quzieview.php?attempl m7 618723, 1:25 PM costae 1S What wl be the output of the folowing program? finchidestdioh> int maing int fur int = fun(10); printf6<\n", return 0; > ine fungine return (he Select one 10 9 8 " cveiion 16 arc out of 180 What wll be the output of the folowing program? Finchideestdioh> int maind intx= 3 floaty = 30 ie==y) printi(x and y are equal’; else print’ and y are not equal” return 0; Select one Random output xcand y are equal xandyy are not equal Error htpssoninetest spoken-tutoralorgimod/quzieview.php?attempl (C-Test24meqs+ 895: Attempt review anr 618723, 1:25 PM uesion 17 What will be the output of the folowing C program? include int maing ‘ char star{10)="HelloWorld printf %e\n" stats) return 0; Select one w Enor vstion 18 comple \What wll be the eutput of the folowing program? Jinclude«stdiohs int maing oie funfchar char 3100 a(0} = "4% aft] = 8 al2] ='CaB3] =D; fun(@a(0); return 0; , void fun(cnar 9) print,“ printf, ta; Select one AB No output Bc o htpssontinetest spoken-tutoralorgimod/quzieview.php?attempl (C-Test24meqs+ 895: Attempt review snr 618723, 1:25 PM vesion 19 What will be the output of the folowing C program? finchideestdioh> void funtint *p) int maing ‘ int [34] = (1,2,3,4,4,3,2,8,7,8, 9,0 int ot ptr = Ba(00} fun return 0 void funtint*p) ‘ printfsea", py Select one 1 2 4 (C-Test24meqs+ 895: Attempt review s0n7 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review vesion 20 What wl be the output of the folowing program? finchide int ming ining switeht) ‘ printf Hello") printf Hi" case 3 continue; defaul: print'Bye", return Select one No output Bye Compilation Error Hello Hi cveston21 Which ofthe following statements should NOT be used ta increase the value of e by 1? Select one htpssoninetest spoken-tutoralorgimod/quzieview.php?attempl war 618723, 1:25 PM uesion 22 What will be the output of the folowing C program? Sincludecstdioh> int reversetin int maing ‘ intro: return 0; > int reverseGint no) 00% fino == 0) return 0; else printf, no) reverse (no) Select one 1.2.3,45 5.43.21 5.4,3.210 Infinite loop (C-Test24meqs+ 895: Attempt review van7 618723, 1:25 PM cuesion 23, Point out the error line inthe following program. 1. tindludeestdioh> 2. struct emp 3 4. char namel20) 5. intage 6 7. int maing) 8 8, emp inte 10. intay 11. print 12, return 13) Select one None of these. Line number 4 Line number 7 Line number 9 ation 24 Compete arc. out of 1.80 Point out the error line inthe following program. 1. bindude-stdiohs 2 int maing 3 4 inta=t0 5. switehia} 6 n 8. rint("This is ¢ program): 9. return 10) Select one Line number 9 Line number Line number 4 None of these. htpssontinetest spoker-tutoralorgimod/quzieview.php?attempl (C-Test24meqs+ 895: Attempt review sa07 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review cuesion 25 Which ofthe following is/are valid expression(s)? Tick all correct answer(s), No partial marks and no negative marks Select one or more None of these 163 cussion 26 Which ofthe following statement() is/are cortect about an atray? Tiek all correct answer(s). No partial marks and no negative marks Select one or more: ‘The aray int num|26); can store 26 elements. ‘The expression num{t] designates the very fist element in the array, leis necessary to intialize the array atthe time of declaration, ‘The declaration num(SIZE is allowed if SIZE is a macro oven BT comple Which of the following is/are correct ways) to increment variable p? Tick all correct answer(s). Select one ot more: No partial marks and no negative marks san 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review cvesion 28 Select the missing code lines from the dropdown provided: The C code given below shpould check whether the number entered by the user is a prime number or not. But, ne numbers 9 and 18 are missing. 1.incudecstdioh> 2.int main 3 4. intrum, i 5. _print("Enter a number\n"; 6. scanf'%d, rum); 7. foxi=dsie=numt; 64) 8 Missing code 1 printf 4d is nota prime number\n’ num) 12, break Missing code 17. print(%6d isa prime number\n, num) 18) 19, return} 20.) Lines Line 15 fi == num 187 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review vesion 29 Select the missing co lines from the dropdown provided The C code given below should find the square ofa given number. But, ine numbers 4 and 6 are missing 1 tinclude 2 int mand 3 4 Missing code. 5. printer the number\n"); 6 -Missing code ~ 7. printft'Square of hd is d\n, num, numtaum) 8.rewumn 0; a) Line 4 int nu line 6 seanfi's4d", &num) cussion 30 Select the missing code lines from the dropdown provided. “The C code given below should print the reverse of a number entered by the user. But, ne numbers 9 and 10 are missing. 1 finclude 2.inemaing 3 4, int num, reverse=0, rem; 5. print('Enter an integer); 6. scare", um) 7. while(oum>0) ae 9. Missing code ~ 10. Missing code ~ 11. numy=10, 12) 13,_ print Reverse is = %,revers} 14, retum 6; 15) Line 9 | rem=nums0 Line 10 ceverse=reverse*10+tem, s6n7 618723, 1:25 PM (C-Test24meqs+ 895: Attempt review sion 31 \What willbe the eutput ofthe program? Type the answer with the correct ease. Sincludecstdioh> int ming ‘ char str{6] = “inca * Print 65" return 0; > uesion 32 comple arc2.0 out of 2.0 \What wll be the output of the folowing program? Write the answer in digits not alphabets. Jincludecstdioh> ine maing ‘ float i=10, + void *e koa ick print%6.2F "i return 0; ) Answer 10.00, ump t. Sample-C-Test = wr

You might also like