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 / ibrazileasum
The initial value of x is not defined to '0' hence the complier will not start from 0 as initial value. This is a garbage error to the compiler
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is oops in simple words?
Why is there no multiple inheritance?
State what is encapsulation and friend function?
Can main method override?
What is the point of oop?
Can enum be null?
What is encapsulation with example?
How do you use inheritance in unity?
Is data hiding and abstraction same?
What is a superclass in oop?
What is polymorphism give a real life example?
What is byval and byref? What are differences between them?
what type of questions
What is overloading and its types?
Why do we use encapsulation in oops?