Quiz for C (Conditional Operators)
Q.1 How many Conditional Operators are there in C ?
Q.2 How many conditional statements are there in C language ?
Q.3 Conditional Statemets are also known as Control Statements/Structures.
Q.4 Which operation is performed by '||' this operator ?
Q.5 Which operation is performed by '&&' this operator ?
Q.6 What does this '!' operator is called in C Language ?
Q.7 What values are returned by the Conditional Statements ?
Q.8 If a = 46, b = 46, c = 64, then if(a==b && b==c), what value will be stored in if ?
Q.9 Which is the Correct syntax of Switch statement ?
Q.10 What will be the output of this code ?
#include<stdio.h>
void main()
int j = 10, i = 20;
{
if(i = 10) && if(j = 20)
{
printf("Good day");
}
else
printf("Bad day")
}
Q.11 Evaluate: !(1 && !(0 || 1 ))
Q.12 Predict the output of the following code.
#include<stdio.h>
void main()
int j = 10, i = 20;
{
if(i = 10) && if(j = 20)
{
printf("Good day");
}
else
printf("Bad day")
}
Q.13 Which of the following cannot be checked in a switch case statement ?
Q.14 We want to test whether a value lies in range of 2 to 4 or 5 to 7 can we do this using switch ?
Q.15 What is the purpose of break statement ?
Instructions:-
- This Quiz is based on the basic concepts of C.
- Each correct answer will carry 2 points.
- The time limit for this Quiz is 480 seconds i.e. 8 minutes.
- The timer will start immediately after clicking on the start button.
- Once an option is selected you cannot select any other, So choose wisely.
- Do not refresh the page as it will reset the quiz.
- Once the time is up the quiz will automatically get submitted with number of questions responded.
- Your total score alongwith your name will be displayed after submission of the Quiz.
- Wish you ALL THE BEST. 👍👍
START
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP