Control Instructions

Q1: Point out the error, if any in the program.
#include<stdio.h>
int main()
{
    int a = 10;
    switch(a)
    {
    }
    printf("This is c program.");
	return 0;
}

A Error: No case statement specified

B Error: No default specified

C No Error

D Error: infinite loop occurs

ANS:C - No Error

There can exists a switch statement, which has no case.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.