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
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
How do you define a class in oop?
What are the 4 pillars of oop?
What is the real time example of inheritance?
Why is abstraction needed?
What is overriding in oops?
What polymorphism means?
What is an interface in oop?
What is the main purpose of inheritance law?
What is the difference between encapsulation and polymorphism?
What does no cap mean?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
What is object in oop?
Why is oop better than procedural?
Get me a number puzzle game-program