You are not logged in.

#1 2015-09-15 05:49:00

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

Implemented Loop:

C Programming Quizzes C Language Control Structures

Directions:
What is the right choice, if the following loop is implemented?

Question:
void main()
{
   int num = 0;
   do{
      --num;
      printf("%d", num);
   }while( ++num >= 0 );
}

Option A):
The program will not enter into the loop
Option B):
There will be a compilation error reported
Option C):
A run time error will be generated
Option D):
The loop will run infinitely many times

Correct Answer is Option D):
The loop will run infinitely many times


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

2015-09-15 05:49:00

Advertisement
Ads By Google

Re: Implemented Loop:



Board footer