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 / d n gavade
The Answer is 3)The Output is undefined because x is not
initialised and its datatype is auto int so that its inital
value will be garbage.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is coupling in oops?
What is byval and byref? What are differences between them?
Why we use classes in oop?
What is ambiguity in inheritance?
How oops is better than procedural?
Why do we use class in oops?
What is polymorphism used for?
Is data hiding and abstraction same?
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.
What are properties in oop?
What is destructor in oop?
Describe these concepts: Polymorphism, Inheritance and Abstraction.
Can bst contain duplicates?
write string class as your own class in java without using any built-in function
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)