InstructionsTotal Questions: 15Total Minutes: 15This ExamTray Free Online Exam tests your C Programming Skills on C Conditional Statements or Operators like If, else if and else, Ternary Question Mark Operator. Exam displays Questions and Answers after finishing. Easily Attend Competitive Exams and Job Interview Questions. Go through C Theory Notes on Conditional Operators before attempting this test. All the Best Challenge SCORE0 / 15Take This Exam 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*Q Buttons 1) What is the output of C Program.? int main() { int x=1; float y = 1.0; if(x == y) { printf("Polo\n"); } if( 1 == 1.0) { printf("Golf\n"); } if( 1.0 == 1.0f ) { printf("Boxing\n"); } return 0; } A) No Output B) Boxing C) Golf Boxing D) Polo Golf Boxing 2) What is the output of C Program.? int main() { int a=9; if(a=8) { printf("Kangaroo\n"); } printf("Eggs\n"); return 0; } A) No output B) Eggs C) Kangaroo Eggs D) Compiler error 3) What is the output of C Program.? int main() { int a=9; if(a==5); { printf("Kangaroo\n"); } printf("Eggs\n"); return 0; } A) Eggs B) Kangaroo Eggs C) No output D) Compiler error 4) What is the output of C Program.? int main() { int a=9; if(a==9); { printf("Ostrich\n"); } elseif(a==8) { printf("Eggs\n"); } printf("White"); return 0; } A) White B) Ostrich White C) No Ouput D) Compiler error 5) What is the output of C Program.? int main() { int a=9; if(a==9) { printf("Ostrich\n"); } else; { printf("Eggs\n"); } printf("White"); return 0; } A) White B) Ostrich White C) Ostrich Eggs White D) Compiler Error 6) What is the output of C Program.? int main() { int a=9, b=5, c=8; a=b=c=10; if(a==9) { printf("Ostrich\n"); } else { printf("Eggs\n"); } printf("White"); return 0; } A) Ostrich Eggs White B) Ostrich White C) Eggs White D) Compiler error as you can not assign to more than two variables at once. 7) What is the output of C Program.? int main() { int a=9, b=5, c=8; if(!(a==9)) { printf("Bear\n"); } else { printf("Elephant\n"); } printf("Fox"); return 0; } A) Bear Fox B) Elephant Fox C) Fox D) Compiler error Ad 8) What is the Priority of C Logical Operators.? NOT (!), AND (&&) and OR (||) A) NOT (!) > AND (&&) > OR (||) B) NOT (!) > AND (&&) = OR (||) C) AND (&&) > OR (||) > NOT (!) D) AND (&&) = OR (||) > NOT (!) 9) What is the output of C Program.? int main() { int a=9, b; b = (a==9) ? (printf("CAT\n");printf("DOG\n")) : (printf("FOX")); return 0; } A) CAT DOG B) FOX C) CAT DOG FOX D) Compiler error 10) What is the output of C Program.? int main() { int a=9, b=6; if(a==9 && b==6) { printf("Hockey"); } else { printf("Cricket"); } return 0; } A) Cricket Football B) Hockey Football C) Football D) Compiler error 11) What is the output of C Program.? int main() { int a=9, b=6; if(a!=9 || b==6) { printf("Hockey\n"); } else { printf("Cricket\n"); } printf("Football"); return 0; } A) Cricket Football B) Hockey Football C) Football D) Compiler error 12) Choose a correct C Operator Priority.? Items in one group ( ) has same priority. A) ( ! ) < (*, /, %) < (+, -) < ( <, <=, >, >=) < (==, !=) < (&&) < (||) < (=) B) (( ! ) , (*, /, %) , (+, -)) < ( <, <=, >, >=) < (==, !=) < (&&) < (||) < (=) C) ( ! ) > (*, /, %) > (+, -) > ( <, <=, >, >=) > (==, !=) > (&&) > (||) > (=) D) (( ! ) , (*, /, %) , (+, -)) > ( <, <=, >, >=) > (==, !=) > (&&) > (||) > (=) 13) What is the output of C Program.? int main() { int a=5, b=8; if( a==5 && (b=9) ) { printf("Gorilla Glass="); } printf("%d %d", a, b); return 0; } A) 5 8 B) 5 9 C) Gorilla Glass=5 8 D) Gorilla Glass=5 9 14) What is the output of C Program.? int main() { int a=5, b=8; if( a==5 || (b=9) ) { printf("Gorilla Glass="); } printf("%d %d", a, b); return 0; } A) 5 8 B) 5 9 C) Gorilla Glass=5 8 D) Gorilla Glass=5 9 Ad 15) Choose a correct C Statement. A) Nesting of ? : operator is possible. B) int main() { int a=5, b=8; if( a>=5 || (b=9) ) { printf("Gorilla Glass"); } return 0; } //OUTPUT: Gorilla Glass C) int main() { int a=5, b=8; if( a >= 5 && b <= 9 ) { printf("Gorilla Glass"); } return 0; } //OUTPUT: Gorilla Glass D) All the above FINISH EXAM 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*PREVConditional Statements Operators - Online Test 1 NEXTC Loops FOR While Do While - Online Test 1 Certification Group ID 3858