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 super in oop?
What is class and object with example?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< Can you inherit a private class? what type of questions Can you explain polymorphism? What is encapsulation with example? What is object and example? What are the types of abstraction? What is the full form of oops? What is the point of oop? What is encapsulation process? What is abstract class in oops? What is the advantage of oop over procedural language? What is overriding vs overloading?