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 encapsulation with example?

1037


What type of loop is a for loop?

1059


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

1821


Why is there no multiple inheritance?

962


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2108


What is the purpose of enum?

971


Get me an image implementation program.

1947


Why do we need polymorphism in c#?

1115


Is abstract thinking intelligence?

994


What is super in oop?

1103


How can you overcome the diamond problem in inheritance?

1143


What is the highest level of cohesion?

992


What polymorphism means?

1010


What are oops methods?

949


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

2201