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 / d n gavade
The Answer is 3)The Output is undefined because x is not
initialised and its datatype is auto int so that its inital
value will be garbage.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Why is encapsulation used?
What is an advantage of polymorphism?
How do you answer polymorphism?
Can we define a class within the interface?
What is difference between oop and pop?
What is a superclass in oop?
Templates mean
What is the problem with multiple inheritance?
What is oops in simple words?
What is polymorphism programming?
Is abstract thinking intelligence?
What are the 3 pillars of oop?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
What is a class in oop?
What is encapsulation selenium?