Welcome to your Quiz on Break Statement in C
1.) What is output of the following code ?
int m=100, n=0;
while(n==0)
{
if(m<10)
break;
m=m-10;
}
printf("%d",m);
2.) What is output of the following code ?
int a=0, i=0, b;
for(i=0;i<5;i++)
{
a++;
if(i==3)
break;
}
printf("%d",a)
3.) The keyword 'break' cannot be used within _______.
4.) What is output of the following code ?
int i=0, j=0;
for(i=0;i<5;i++)
{
for(j=0;j<4;j++){
if(i>1) break;
}
printf("Hi \n");
}
5.) Choose the correct statement about C 'break' statement.
6.) What is the output of the C Program ?
int main(){
while(true){
printf("Jaipur");
break;
}
return 0;
}
7.) 'break' statement is used inside the _______.
8.) What is the output of following C code ?
#include
void main()
{
int i=0;
if(i==0){
printf("Hello");
break;
}
}
9.) break statement is which type of statement ?