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
What is abstraction and encapsulation?
Why do we use encapsulation in oops?
How many human genes are polymorphic?
What is abstraction in oops with example?
Why is abstraction needed?
What is destructor oops?
What is oops concept with example?
Explain virtual inheritance?
Can you explain polymorphism?
How is class defined?
What exactly is polymorphism?
What is inheritance in simple words?
State what is encapsulation and friend function?
How long to learn object oriented programming?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.