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

The initial value of x is not defined to '0' hence the complier will not start from 0 as initial value. This is a garbage error to the compiler

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oops in simple words?

1033


Why is there no multiple inheritance?

953


State what is encapsulation and friend function?

1190


Can main method override?

1060


What is the point of oop?

1105


Can enum be null?

964


What is encapsulation with example?

1024


How do you use inheritance in unity?

1025


Is data hiding and abstraction same?

968


What is a superclass in oop?

1110


What is polymorphism give a real life example?

973


What is byval and byref? What are differences between them?

2150


what type of questions

2065


What is overloading and its types?

1079


Why do we use encapsulation in oops?

971