Welcome Guest | Sign in | Register
Loops - Discussion Page For Q.10450 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Loops > Questions and Answers

Q: How many times the while loop will get executed?
main ( )
{
int a = 1 ;
while ( a <= 100) ;
{
printf ( "%d", a++ ) ;
}
}
A. 100 B. 1
C. 0 D. Infinite

Answer and Explanation

Answer:Infinite

Explanation:
Loop will execute infinite no of times because of the ; at the end while loop.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.