MCQs on Conditional Statements & Loops - C Programming Multiple Choice questions with answers
Questions
6
How many times will the following loop be executed?
ch = ‘b’ while (ch > = ‘a’ && ch <= ‘z’)
Answer: Option [B]
7
Study the following ‘C’ program
#include <stdio.h>
void main ()
{
int a = 7, b = 5;
switch (a/a % b)
{
case 1 : a = a-b;
case 2 : a = a+b;
case 3 : a = a*b;
case 4 : a = a/b;
default : a = a;
}
}
One the execution of above program, what will be the variable a?
Answer: Option [C]
⭐ Make GKSeries Your Preferred Source on Google
Add GKSeries as Preferred Source
9
Study the following ‘C’ program
#include <stdio.h>
void main ()
{
static a, b;
while (a > b ++)
}
What will be the value of a and b on the execution of above program?
Answer: Option [A]
10
A labeled statement consist of an identifier followed by a
Answer: Option [C]