You are not logged in.

#1 2015-09-15 04:31:40

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

C Language Control Structures Quiz Question.

C Programming Quizzes C Language Control Structures

Directions:
What will be the output of the following code?

Question:
#include<stdio.h>
void main()
{
    int s=0;
    while(s++<10)
    {
        if(s<4 && s<9)
        continue;
        printf("%d", s);
    }
}

Option A):
4 5 6 7 8 9 10
Option B):
1 2 3 4 5 6 7 8 9
Option C):
1 2 3 10
Option D):
4 5 6 7 8 9

Correct Answer is Option A):
4 5 6 7 8 9 10


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-15 04:31:40

Advertisement
Ads By Google

Re: C Language Control Structures Quiz Question.



Board footer