ExamVeda
Login
Home
Operators and Expressions
?

Find the output of the following program.
#include<stdio.h>
void main()
{
   int y=10;
   if(y++>9 && y++!=11 && y++>11)
      printf("%d", y);
   else
      printf("%d", y);
}

Answer & Solution
Correct Answer: Option B

Since the second condition is false so, further conditions will not be checked, it will be skipped.

Examveda
Question posted by Examveda
Community

Join the Discussion

4 Comments
Shantaram Nana
Shantaram Nana 5 years ago
Y=10;
(Y++>9)
(10++>9)
Y=11
So , second condition is false y=11
Narendra B
Narendra B 6 years ago
How?
Uroos Saleem
Uroos Saleem 6 years ago
Answer should be 11
Grigory Peter
Grigory Peter 9 years ago
how this happens