You are not logged in.

#1 2015-09-15 05:44:15

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

C Language Control Structures Output:

C Programming Quizzes C Language Control Structures

Directions:
Find the output of the following program.

Question:
#include<stdio.h>
void main()
{
   int y=10;
   if(y++>9 && y++!=10 && y++>11)
      printf("%d", y);
   else
      printf("%d", y);
}

Option A):
14
Option B):
12
Option C):
13
Option D):
11

Correct Answer is Option C):
13


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

2015-09-15 05:44:15

Advertisement
Ads By Google

Re: C Language Control Structures Output:



Board footer