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 the main purpose of inheritance law?
What is the real life example of polymorphism?
What is the difference between procedural programming and oops?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
When not to use object oriented programming?
What are the important components of cohesion?
What is the point of oop?
What are the two different types of polymorphism?
How to use CMutex, CSemaphore in VC++ MFC
What is the difference between static polymorphism and dynamic polymorphism?
Templates mean
Can you explain polymorphism?
What is overriding vs overloading?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What is object in oop?