=0) { printf("%u",i) i--; }}How many times the loop will get executed 11 times Dear Friends, It will never end because the i is unsigned it will never reach the nagative value. the loop will never executed because 10 is greater tha . 7 members have posted answers.">
GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Placement Papers  >  TCS  >  Placement Papers
Go To First  |  Previous Question  |  Next Question 
 Placement Papers  |  Question 15 of 23    Print  
Consider the following program
main()
{
unsigned int i=10;
while(i>=0)
{
printf("%u",i)
i--;
}
}
How many times the loop will get executed

  
Total Answers and Comments: 7 Last Update: February 01, 2007     Asked by: sruthi 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 04, 2006 06:30:51   #1  
ak        

RE: Consider the following programmain(){
11 times
 
Is this answer useful? Yes | No
September 08, 2006 01:19:04   #2  
S.Sabarinathan        

RE: Consider the following programmain(){
Dear Friends, It will never end because the i is unsigned it will never reach the nagative value.
 
Is this answer useful? Yes | No
September 10, 2006 16:27:18   #3  
ronit Member Since: September 2006   Contribution: 1    

RE: Consider the following programmain(){

the loop will never executed because 10 is greater than 0


 
Is this answer useful? Yes | No
September 30, 2006 02:28:10   #4  
G.C.V.Rajesh        

RE: Consider the following programmain(){

It becomes an infinite loop.


 
Is this answer useful? Yes | No
October 05, 2006 01:24:28   #5  
ajay        

RE: Consider the following programmain(){
yes its an infine loop program good one anyways
 
Is this answer useful? Yes | No
January 18, 2007 02:13:43   #6  
batche Member Since: January 2007   Contribution: 3    

RE: Consider the following programmain(){

ya frnds,

the correct ans will b......

 tht the loop will run INFINITE TIMES.....


 
Is this answer useful? Yes | No
February 01, 2007 02:53:08   #7  
APPU        

RE: Consider the following programmain(){
It results an infinite loop
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape