You are not logged in.

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

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

Implemented Loop:

http://interviewquestionsanswers.org/quiz/C-Programming http://interviewquestionsanswers.org/qu … 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


Failure is the first step towards seccess.

2015-09-15 05:49:02

Advertisement
Ads By Google

Re: Implemented Loop:



Board footer