Welcome Guest | Sign in | Register
Loops - Discussion Page For Q.10447 | 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 below loop will get executed?
main()
{
int i,j;
i = 10;
for (j=i==10 ; j<=10 ; j++)
{
printf("\n%d",j);
}
}  
A. 1 B. 10
C. 11 D. Compilation Error

Answer and Explanation

Answer:10

Explanation:
Expression i ==10 return 1 and j get initialized to 1.

Comment on this Question

Name:

Loading...




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