Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What will happen when the following code is run:
int x;
while(x<100)
{
cout<<x;
x++;
}




1) The computer will output "0123...99"


2) The computer will output "0123...100"


3) The output is undefined

Answer Posted / nk

Output is undefined because initially variable 'x' is not
initialized and may contain some garbage value.

However if we initialize 'x' to 0 then choice#1 is correct.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a programe to calculate the simple intrest and compund intrest using by function overlading

2207


How does polymorphism work?

1147


What is inheritance write a program to show use of inheritance?

1149


What is inheritance and how many types of inheritance?

1105


hi all..i want to know oops concepts clearly can any1 explain??

2141


What is oops with example?

1053


What does I oop mean?

1077


what is graphics

2465


What is overriding in oop?

1044


What does enum stand for?

1126


How do you define a class in oop?

1126


Prepare me a program for the animation of train

2478


What is difference between multiple inheritance and multilevel inheritance?

1150


Why multiple inheritance is not possible?

1074


What is overriding in oops?

1110