C
Programming and Technical
Programming
Basics
#include
void main()
{
int i;
for(i=0;i<10;i++)
{
if(i<5)
continue;
else
break;
printf("%d",i);
}
}
Read Solution (Total 13)
-
- error because standard libraries hasn't defined so as to run the program
- 8 years agoHelpfull: Yes(3) No(0)
- standard file didn't declare in above program
but after declaration library file
Nothing is printed.
- 8 years agoHelpfull: Yes(3) No(0)
- without defining library file we can't get output.
- 8 years agoHelpfull: Yes(2) No(0)
- no out put because after break statement it will out of loop it will not read print statement
- 8 years agoHelpfull: Yes(2) No(0)
- 01234 loop get brk ,,, when it reaches 5
- 8 years agoHelpfull: Yes(1) No(2)
- The output won't return anything.As due to break statement failing the above condition hence it will come out of the loop and won't print anything
- 8 years agoHelpfull: Yes(1) No(0)
- error!
becz the library file doesn't defined - 8 years agoHelpfull: Yes(1) No(0)
- 5
As the loop will terminate whein i will become 5 - 8 years agoHelpfull: Yes(0) No(1)
- The Answer is 5
- 8 years agoHelpfull: Yes(0) No(1)
- No output.
Reason : For four cases of i , i.e 0 1 2 3 4, continue statement will be encountered, which directs the control to the 'if' condition. - 8 years agoHelpfull: Yes(0) No(0)
- stdio.h library has the definition for the function printf().since here the stdio.h directory is not included.
so the prototype is missing.
Error 'printf' prototype missing
even though if it is included according to the conditions the no output will be printed.
- 8 years agoHelpfull: Yes(0) No(0)
- Notice that printf statement is inside the for loop and there are continue and break statements, therefore for i=0 to i=4 continue will be encountered and for i=5 loop will be terminated because of break statement. Thus the printf will never be excecuted. hence there will be no output for this program.
- 7 years agoHelpfull: Yes(0) No(0)
- 5.After incrementing 4 ,the loop will be terminated.
- 7 years agoHelpfull: Yes(0) No(0)
C Other Question