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 / rakesh

the output is undefined
because c++ do not implicitly initialised the varible. it
gives garbage value for uninitialized variables

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the main purpose of inheritance law?

1146


What is the real life example of polymorphism?

1111


What is the difference between procedural programming and oops?

1056


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

4079


When not to use object oriented programming?

1018


What are the important components of cohesion?

966


What is the point of oop?

1103


What are the two different types of polymorphism?

1086


How to use CMutex, CSemaphore in VC++ MFC

4736


What is the difference between static polymorphism and dynamic polymorphism?

1027


Templates mean

2027


Can you explain polymorphism?

1041


What is overriding vs overloading?

1004


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

2146


What is object in oop?

1060