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 / deepanker aggarwal
the answer is 3 because x is not initialised and it may
contain any garbage value
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is class and object with example?
What is the fundamental idea of oop?
What is inheritance and how many types of inheritance?
Can bst contain duplicates?
Get me a number puzzle game-program
Why do we use polymorphism in oops?
What is the difference between procedural programming and oops?
What is purpose of inheritance?
Can main method override?
What is oops in simple words?
Give two or more real cenario of virtual function and vertual object
Explain the concepts involved in Object Oriented programming.
Why do while loop is used?
Write a program to reverse a string using recursive function?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?