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

In most of the compilers now all declared variables are
usually initialised with 0. So in most compilers result
would be #1. But in some cases the garbage values may creep
up.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between abstraction and encapsulation?

1064


Why is polymorphism needed?

1043


What is polymorphism and why is it important?

1023


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1971


What are the 4 main oop principles?

1213


What is variable example?

1015


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2299


What exactly is polymorphism?

1113


Why multiple inheritance is not possible?

1054


What is basic concept of oop?

1145


Can we override main method?

1177


What is abstraction example?

1080


What are the advantages of polymorphism?

1019


Is abstract thinking intelligence?

1028


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1838