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 / aravind
In most of the compilers now all declared variables are
usually initialised with 0. So in most compilers result
would be #1. But in some cases the garbage values may creep
up.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Whats oop mean?
How to improve object oriented design skills?
What do you mean by overloading?
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.
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is abstraction and encapsulation?
What do you mean by abstraction?
Can main method override?
What is object in oop with example?
Why multiple inheritance is not possible?
What does oop mean in snapchat?
What is difference between abstraction and encapsulation?
How does polymorphism work?
What is overloading and its types?
What does it mean when someone says I oop?