Quiz for C (Conditional Operators)

Time left: 480 seconds

Q.1 How many Conditional Operators are there in C ?

2
4
3
5
Q.2 How many conditional statements are there in C language ?

3
4
5
2
Q.3 Conditional Statemets are also known as Control Statements/Structures.

True
False
Q.4 Which operation is performed by '||' this operator ?

Logical Right Shift
Logical Left Shift
Logical OR
Logical NOR
Q.5 Which operation is performed by '&&' this operator ?

Double Reference/Address
Logical AND
Logical OR
Logical NOT
Q.6 What does this '!' operator is called in C Language ?

Excalmation Mark Operator
NOR Operator
Logical Left Shift Operator
NOT Operator
Q.7 What values are returned by the Conditional Statements ?

String
Integer
Boolean
Character
Q.8 If a = 46, b = 46, c = 64, then if(a==b && b==c), what value will be stored in if ?

True
False
a = 46, b = 46, c = 64
It will show an Error
Q.9 Which is the Correct syntax of Switch statement ?

switch(var_name)
switch('var_name');
Switch(var_name);
None of the above
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")
}                        


Good day
Bad day
Compile error
Error: Expression syntax
Q.11 Evaluate: !(1 && !(0 || 1 ))

True
False
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")
}                        


None
ASTWITZ
Error :L value required
undefined variable j
Q.13 Which of the following cannot be checked in a switch case statement ?

Integer
enum
character
float
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 ?

YES
NO
Q.15 What is the purpose of break statement ?

It terminates the further execution
It has no use
It terminates the program execution of the block in which it is used
It will break the line

Instructions:-

  1. This Quiz is based on the basic concepts of C.
  2. Each correct answer will carry 2 points.
  3. The time limit for this Quiz is 480 seconds i.e. 8 minutes.
  4. The timer will start immediately after clicking on the start button.
  5. Once an option is selected you cannot select any other, So choose wisely.
  6. Do not refresh the page as it will reset the quiz.
  7. Once the time is up the quiz will automatically get submitted with number of questions responded.
  8. Your total score alongwith your name will be displayed after submission of the Quiz.
  9. Wish you ALL THE BEST. 👍👍

START

Results:-

Hi






Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post