C-Control Instructions Questions and Answers
Practice ModeShowing 10 of 24 questions
Q1
How many times the while loop will get executed if a short int is 2 byte wide?
#include<stdio.h>
int main()
{
int j=1;
while(j <= 255)
{
printf("%c %d\n", j, j);
j++;
}
return 0;
}
Answer: Option B
Q2
Which of the following is not logical operator?
Answer: Option A
Q3
In mathematics and computer programming, which is the correct order of mathematical operators ?
Answer: Option B
Q4
Which of the following cannot be checked in a switch-case statement?
Answer: Option C
Q5
What is the purpose of a control instruction in C programming?
Answer: Option C
Explanation: Control instructions determine the flow of program execution by making decisions and looping.
Q6
Which loop is guaranteed to execute at least once in C?
Answer: Option C
Explanation: Do-while loop checks condition after execution, ensuring at least one iteration.
Q7
What is the output of: for(i=0;i<3;i++) printf("%d",i);
Answer: Option A
Explanation: Loop runs for i=0,1,2 and prints each value.
Q8
Which statement is used to terminate a loop immediately in C?
Answer: Option B
Explanation: Break statement exits the loop immediately without completing remaining iterations.
Q9
What does the continue statement do in a loop?
Answer: Option B
Explanation: Continue skips the current iteration and moves to the next iteration of the loop.
Q10
Which is an entry-controlled loop in C?
Answer: Option B
Explanation: While loop checks condition before entering the loop body.