InstructionsTotal Questions: 20Total Minutes: 20This ExamTray Free Online Exam tests your C Programming Skills on C Loops or Iterations with FOR, WHILE and DO WHILE Syntax. Know about continue and break statements. Exam displays Questions and Answers after finishing. Easily Attend Competitive Exams and Job Interview Questions. Go through C Theory Notes on Loops before attempting this test. All the Best Challenge SCORE0 / 20Take This Exam 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*Q Buttons 1) Choose a right C Statement. A) Loops or Repetition block executes a group of statements repeatedly. B) Loop is usually executed as long as a condition is met. C) Loops usually take advantage of Loop Counter D) All the above. 2) Loops in C Language are implemented using.? A) While Block B) For Block C) Do While Block D) All the above 3) Which loop is faster in C Language, for, while or Do While.? A) for B) while C) do while D) All work at same speed 4) Choose correct C while loop syntax. A) while(condition) { //statements } B) { //statements }while(condition) C) while(condition); { //statements } D) while() { if(condition) { //statements } } 5) Choose a correct C for loop syntax. A) for(initalization; condition; incrementoperation) { //statements } B) for(declaration; condition; incrementoperation) { //statements } C) for(declaration; incrementoperation; condition) { //statements } D) for(initalization; condition; incrementoperation;) { //statements } 6) Choose a correct C do while syntax. A) dowhile(condition) { //statements } B) do while(condition) { //statements } C) do { //statements }while(condition) D) do { //statements }while(condition); 7) What is the output of C Program.? int main() { while(true) { printf("RABBIT"); break; } return 0; } A) RABBIT B) RABBIT is printed unlimited number of times. C) No output D) Compiler error. Ad 8) What is the output of C Program.? int main() { int a=5; while(a==5) { printf("RABBIT"); break; } return 0; } A) RABBIT is printed unlimited number of times B) RABBIT C) Compiler error D) None of the above. 9) What is the output of C Program.? int main() { int a=5; while(a=123) { printf("RABBIT\n"); break; } printf("GREEN"); return 0; } A) GREEN B) RABBIT GREEN C) RABBIT is printed unlimited number of times. D) Compiler error. 10) What is the output of C Program.? int main() { int a=5; while(a >= 3); { printf("RABBIT\n"); break; } printf("GREEN"); return 0; } A) GREEN B) RABBIT GREEN C) RABBIT is printed infinite times D) None of the above 11) What is the output of C Program.? int main() { int a=25; while(a <= 27) { printf("%d ", a); a++; } return 0; } A) 25 25 25 B) 25 26 27 C) 27 27 27 D) Compiler error 12) What is the output of C Program.? int main() { int a=32; do { printf("%d ", a); a++; }while(a <= 30); return 0; } A) 32 B) 33 C) 30 D) No Output 13) What is the output of C Program.? int main() { int a=32; do { printf("%d ", a); a++; if(a > 35) break; }while(1); return 0; } A) No Output B) 32 33 34 C) 32 33 34 35 D) Compiler error 14) Choose a correct C Statement. A) a++ is (a=a+1) POST INCREMENT Operator B) a-- is (a=a-1) POST DECREMENT Opeartor --a is (a=a-1) PRE DECREMENT Opeator C) ++a is (a=a+1) PRE INCRMENT Operator D) All the above. Ad 15) Choose correct Syntax for C Arithmetic Compound Assignment Operators. A) a+=b is (a= a+ b) a-=b is (a= a-b) B) a*=b is (a=a*b) a/=b is (a = a/b) C) a%=b is (a=a%b) D) All the above. 16) What is the output of C Program.? int main() { int k, j; for(k=1, j=10; k <= 5; k++) { printf("%d ", (k+j)); } return 0; } A) compiler error B) 10 10 10 10 10 C) 11 12 13 14 15 D) None of the above 17) What is the output of C Program.? int main() { int k; for(k=1; k <= 5; k++); { printf("%d ", k); } return 0; } A) 1 2 3 4 5 B) 1 2 3 4 C) 6 D) 5 18) What is the output of C Program.? int main() { int k; for(;;) { printf("TESTING\n"); break; } return 0; } A) No Output B) TESTING C) Compiler error D) None of the above 19) What is the output of C Program.? int main() { int k; for(printf("FLOWER "); printf("YELLOW "); printf("FRUITS ")) { break; } return 0; } A) Compiler error B) FLOWER FRUITS C) FLOWER YELLOW D) FLOWER YELLOW FRUITS 20) What is the way to suddenly come out of or Quit any Loop in C Language.? A) continue; statement B) break; statement C) leave; statement D) quit; statement FINISH EXAM 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*PREVC Conditional Statements Operators - Online Test 2 NEXTC Loops FOR While Do While - Online Test 2 Certification Group ID 3858