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
What is class and object in oops?
What is overriding vs overloading?
What does and I oop and sksksk mean?
write a C++ program for booking using constructor and destructor.
Where You Can Use Interface in your Project
What are the 3 principles of oop?
Why do we use polymorphism in oops?
What does no cap mean?
What is the purpose of enum?
How to call a non virtual function in the derived class by using base class pointer
What is the full form of oops?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
What polymorphism means?
Write a c++ program to display pass and fail for three student using static member function
Which method cannot be overridden?