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

Write a program to sort the number with different sorts in one program ??

2323


How do you achieve runtime polymorphism?

994


which feature are not hold visual basic of oop?

2147


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1864


What do you mean by abstraction?

1024


What is the purpose of polymorphism?

1083


Can a destructor be called directly?

1019


How do you achieve polymorphism?

1036


What is a class and object?

1001


What is static modifier?

1126


Get me a number puzzle game-program

2180


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1571


Get me an image implementation program.

1938


What is solid in oops?

1040


What are the benefits of interface?

993