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

What is the purpose of enum?

999


What does oop mean in snapchat?

1219


What is overloading and its types?

1149


What is destructor in oop?

1020


What is the difference between abstraction and polymorphism?

1080


What is the main purpose of inheritance law?

1184


What is abstraction oop?

1067


What is encapsulation in oop?

1029


Get me an image implementation program.

1971


what are the ways in which a constructors can be called?

2114


What is object in oop?

1099


What is an example of genetic polymorphism?

1163


How to use CMutex, CSemaphore in VC++ MFC

4770


Which language is pure oop?

980


Can we create object of abstract class?

1070