You are not logged in.

#1 2015-09-14 05:53:24

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 Program Fragment:

C Programming Quizzes C Language Operators And Expressions

Directions:
Consider the following program fragment, and choose the correct one:

Question:
void main()
{
   int a, b = 2, c;
   a = 2 * (b++);
   c = 2 * (++b);
}

Option A):
a = 4, c = 8
Option B):
b = 3, c = 6
Option C):
b = 4, c = 6
Option D):
a = 3, c = 8

Correct Answer is Option A):
a = 4, c = 8


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

2015-09-14 05:53:24

Advertisement
Ads By Google

Re: C Language Operators And Expressions Program Fragment:



Board footer