ExamVeda
Login
Home
This question belongs to C Program Control Structures
Control Structures
?

What will be the output of the following code?
#include<stdio.h>
void main()
{
    int s=0;
    while(s++<10)
    {
        if(s<4 && s<9)
        continue;
        printf("%dt", s);
    }
}

Answer & Solution
Correct Answer: Option C
'If' statement only true when value of 's' is less then 4

Control Structures mcq solution image

Examveda
Question posted by Examveda
Community

Join the Discussion

6 Comments
Shehzana Kanwal
Shehzana Kanwal 9 years ago
in case of 0,1,2 and three why it is not printed cant understand
Examveda
Examveda 9 years ago
Hello Guys Solution of the above question is update. Please check it.
Praveen Kumar
Praveen Kumar 9 years ago
Guys please tell me how is it possible??
NITIKA GARG
NITIKA GARG 10 years ago
i think the answer will be d because of the presence f break it will again go to the continue and ultimately it will hang
Lucky Rathod
Lucky Rathod 10 years ago
How is the output
Sanchit Singh
Sanchit Singh 10 years ago
Ans is d not c becz when s =10 condition will be false so while loop will not execute