3) 45678910

1 User has rated as useful.
Login to rate this answer.
Ans is 3---> 4 5 6 7 8 9 10
Login to rate this answer.
Ans is ------(3) 4 5 6 7 8 9 10
Login to rate this answer.
Rizwan basha
Answered On : Sep 14th, 2011
2) 1 2 3 10
Login to rate this answer.
Roshan
Answered On : Sep 15th, 2011
0 1 2 3
Login to rate this answer.
456789
Login to rate this answer.
1 2 3 10
Login to rate this answer.
Clever.
Answer is 3) 4 5 6 7 8 9 10
Reason:
The result of the expression s++ is the value of s *before* the increment, so the expression (s++ < 10) operates on the values 0 through 9.
In the body of the loop, s has been incremented, so the expression (s < 4 && s < 9) operates on the values 1 through 10. When s is between 1 and 3, the continue statement is executed and the loop repeats from the beginning, skipping the printf. So only the values 4 through 10 are written to standard output.
Nits: unless your compiler documentation *explicitly* lists void main() as a legal signature, use int main(void) instead.

2 Users have rated as useful.
Login to rate this answer.
aswinipani
Answered On : Sep 25th, 2011
ans is (3)- 4 5 6 7 8 9 10
Login to rate this answer.
Abhinav kumar
Answered On : Sep 28th, 2011
The result of the expression s++ is the value of s *before* the increment, so the expression (s++ < 10) operates on the values 0 through 9.
So Ans is 45678910
Login to rate this answer.
abhir
Answered On : Sep 29th, 2011
ans is 456789
Login to rate this answer.
Just to make things clear:
Code
#include void main()
{
int s=0;
while(s++<10)
{
if(s<4 && s<9) continue;
}
}
This will not be compiled. #include wants some file name...

2 Users have rated as useful.
Login to rate this answer.
4 5 6 7 8 9
Login to rate this answer.
gowda
Answered On : Oct 18th, 2011
The ans is 3) 4 5 6 7 8 9
Login to rate this answer.
Patil Navanath
Answered On : Jan 31st, 2012
1 2 3 10
Login to rate this answer.
udaykiran
Answered On : Feb 8th, 2012
Answer is 4.
Login to rate this answer.
Amit Jain
Answered On : Mar 25th, 2012
Answer is 3
Login to rate this answer.
4 5 6 7 8 9 10
Login to rate this answer.
ANKUR
Answered On : Jun 7th, 2012
45678910
Login to rate this answer.
Ravindra Kumar saxena
Answered On : Jul 25th, 2012
45678910
Login to rate this answer.
Nupur Boral
Answered On : Aug 16th, 2012
Ans:3 s++ means-first s=0 then s=s+1.so checking the initial value of s & then increment the value of s.In this way continuing this process & print the value of s.
Login to rate this answer.