You are not logged in.

#1 2015-09-14 05:57:27

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

C Language Operators And Expressions Code Output:

C Programming Quizzes C Language Operators And Expressions

Directions:
Identify the correct output of the following code:

Question:
void main()
{
   int w=10, x=5, y=3, z=3;
   if( (w<x) && (y=z++) )
      printf("%d %d %d %d", w, x, y, z);
   else
      printf("%d %d %d %d", w, x, y, z);
}

Option A):
10 5 3 3
Option B):
10 5 3 4
Option C):
10 5 4 4
Option D):
10 5 4 3

Correct Answer is Option A):
10 5 3 3


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

2015-09-14 05:57:27

Advertisement
Ads By Google

Re: C Language Operators And Expressions Code Output:



Board footer