You are not logged in.

#1 2015-09-14 06:00:13

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

Expressions Executed Code:

C Programming Quizzes C Language Operators And Expressions

Directions:
void main()
{
   int a=10, b;
   b = a++ + ++a;
   printf("%d %d %d %d", b, a++, a, ++a);
}

Question:
what will be the output when following code is executed?

Option A):
22 13 13 13
Option B):
22 11 11 11
Option C):
12 10 11 13
Option D):
22 12 12 13

Correct Answer is Option A):
22 13 13 13


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

2015-09-14 06:00:13

Advertisement
Ads By Google

Re: Expressions Executed Code:



Board footer