You are not logged in.

#1 2015-09-15 05:47:27

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

C Language Control Structures Executed:

C Programming Quizzes C Language Control Structures

Directions:
What will be the value of sum after the following program is executed?

Question:
void main()
{
   int sum=1, index = 9;
   do{
      index = index  1;
      sum *= 2;
   }while( index > 9 );
}

Option A):
2
Option B):
1.2
Option C):
4
Option D):
1

Correct Answer is Option A):
2


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

2015-09-15 05:47:27

Advertisement
Ads By Google

Re: C Language Control Structures Executed:



Board footer