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 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(); }
How do you answer polymorphism?
What is the purpose of polymorphism?
What is variable example?
What is class encapsulation?
Why do we use class in oops?
what's the basic's in dot net
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is pure oop?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
Is data hiding and abstraction same?
What type of loop is a for loop?
Can we override main method?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
What is coupling in oop?