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 encapsulation in oop?

1104


Templates mean

2151


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

3606


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6731


What is polymorphism what is it for and how is it used?

1058


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?

1973


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

1423


Can a destructor be called directly?

1137


Are polymorphisms mutations?

1213


What is object in oop?

1170


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2596


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

1920


What is constructor overloading in oop?

1180


What does and I oop mean in text?

1316


Can main method override?

1151