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
What is encapsulation in oop?
Templates mean
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?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What is polymorphism what is it for and how is it used?
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?
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.
Can a destructor be called directly?
Are polymorphisms mutations?
What is object in oop?
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What is constructor overloading in oop? What does and I oop mean in text? Can main method override?