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 an advantage of polymorphism?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is the example of polymorphism?
Is data hiding and abstraction same?
#include
What is interface in oop?
Which is better struts or spring?
What is the fundamental idea of oop?
write a C++ program for booking using constructor and destructor.
Why do we use class?
What is oops with example?
What is byval and byref? What are differences between them?
How do you define social class?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What is encapsulation in ict?