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 overloading and its types?
How do you define a class in oop?
What is polymorphism programming?
What are the two different types of polymorphism?
Which is not an object oriented programming language?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
What is the real time example of inheritance?
Where is pseudocode used?
What is encapsulation example?
What is the example of polymorphism?
What is overriding in oops?
What is an advantage of polymorphism?
Which is better struts or spring?
What is solid in oops?
What is the significance of classes in oop?