if-else MCQ in C: if-else Multiple Choice Questions in C 

if-else MCQ in C with answers and explanations for placement tests and job interviews. These solved if-else MCQ in C are useful for the campus placement for all freshers including Engineering Students, MCA students, Computer and IT Engineers, etc.

Our if-else MCQ in C (if-else Multiple Choice Questions ) focuses on various parts of the conditional statement in the C language. It will be useful for anyone learning the C programming language. We will regularly update the quiz and most interesting thing is that questions come in a random sequence. So every time you will feel new questions.

We have already written some articles on the if-else statement if you want you can also check these blog posts.

 

There are several C language courses that you may have come across during your search for learning the C language. Our team of experts has carefully analyzed some C courses for you. You can check the courses, Trial of some courses is free.

 

Guideline of if-else MCQ in C:

This C if-else MCQ is intended for checking your C programming knowledge. It takes 30 minutes to pass the C if-else MCQ. If you don’t finish the MCQ within the mentioned time, all the unanswered questions will count as wrong. You can miss the questions by clicking the “Next” button and return to the previous questions by the “Previous” button. Every unanswered question will count as wrong. MCQ on if-else in C programming has features of randomization which feel you a new question set at every attempt.

In this if-else Quiz, we have also implemented a feature that not allowed the user to see the next question or finish the C if-else quiz without attempting the current if-else MCQ.

12 votes, 4.1 avg

You have 30 minutes to take the if-else MCQs in C

Your time has been Over.


if-else statement MCQ in C

C Programming Multiple Choice Questions And Answers

if-else statement MCQ in C: if-else statement MCQ in C Multiple Choice Questions and Answers

1 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(2 > 5);
    {
        printf("Hi");
        printf("Bye");
    }

    return 0;
}

 

2 / 25

What is the output?

#include <stdio.h>

int main()
{

    int a =2;
    int b = 0;
    if(b || a++)
    {
        printf("%d",a);
    }
    else
    {
        printf("%d",a);
    }

    return 0;
}

 

3 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(2 < 6)
        printf("Hurray..\n");
        printf("Yes");
    else
        printf("England")

    return 0;
}

 

4 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(6 > 2)
        printf("Aticleworld");
    else if(4%2 == 0)
        printf(".com");
    printf("Thanks");

    return 0;
}

 

5 / 25

How many choices are possible when using a single if-else statement?

6 / 25

What will be the output of the following C code?

#include <stdio.h>

int x;
int main()
{
    if (x)
        printf("hi");
    else
        printf("how are u");

    return 0;
}

 

7 / 25

Say that value has a 19 stored in it, and that extra has a 25 stored in it. Evaluate (to true or false) each of the following expressions:

value <= extra extra < value value > -25 value >= extra

8 / 25

Evaluate (to true or false) each of the following expressions:

14 <= 14    14 < 14    -9 > -25    -25 > -9

9 / 25

What is the output?

#include <stdio.h>

int main()
{
    if( 3 < 1 )
    {
        printf("Mysuperblist..\n");
    }
    else if(7 > 4)
    {
        printf("Aticleworld");
    }
    return 0;
}

 

10 / 25

What below code do?

#include <stdio.h>

int main()
{
    int a, b, c;
    printf(" Enter three numbers\n");
    scanf("%d%d%d", &a,&b,&c);
    if (a > b)
    {
        if (a > c)
        {
            printf("%d\n",a);
        }
        else
        {
            printf("%d\n",c);
        }
    }
    else if (b > c)
    {
        printf("%d\n",b);
    }
    else
    {
        printf("%d\n",c);
    }
    return 0;
}

 

 

11 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(2 > 5);
    {

        printf("Hi");
    }
    printf("Bye");

    return 0;
}

 

12 / 25

Which of the following shows the correct syntax for an if statement?

13 / 25

Which of the following is the boolean operator for logical-and?

14 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(2 > 5);
    {
        printf("Hi");
    }
    else
    {
        printf("Bye");
    }

    return 0;
}

 

15 / 25

Which of the following is true?

16 / 25

What is the output of the below code?

#include <stdio.h>

int main()
{
    if(4 > 5)
    {
        printf("Hurray..");
    }
    printf("Yes");

    return 0;
}

 

17 / 25

A sequence of statements contained within a pair of braces ("{" and "}") is called a:

18 / 25

Evaluate !(1 && !(0 || 1)).

19 / 25

What is the output?

#include <stdio.h>

int main()
{

    int a =2;
    int b = 0;
    if(b || a++)
    {
        printf("%d",a);
    }
    else
    {
        printf("%d",b);
    }

    return 0;
}

 

20 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(printf("Aticleworld "))
        printf("Hi");
    else
        printf("Bye");
    return 0;
}

 

21 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(printf("Aticleworld "));
        printf("Hi");
    else
        printf("Bye");
    return 0;
}

 

22 / 25

What is the output?

#include <stdio.h>

int main()
{
    if("Aticleworld")
    {
        printf("Aticleworld");
    }
    else if('A')
    {
        printf(".com");
    }
    printf(" Let's learn together");

    return 0;
}

 

23 / 25

What is the output?

#include <stdio.h>

int main()
{
    if("Aticleworld")
    {
        printf("Aticleworld");
    }
    if('A')
    {
        printf(".com");
    }
    printf(" Let's learn together");

    return 0;
}

 

24 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(-2)
    {
        printf("Aticleworld");
    }
    if(2)
    {
        printf(".com");
    }
    printf(" Thanks");

    return 0;
}

 

25 / 25

What is the output?

#include <stdio.h>

int main()
{
    if(!printf("Aticleworld "))
        printf("Hi");
    else
        printf("Bye");
    return 0;
}

 

Your score is

The average score is 0%

0%

Recommended Articles for you:

Leave a Reply

Your email address will not be published. Required fields are marked *