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
class type to basic type conversion
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
Can we create object of abstract class?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
How do you define a class in oop?
What is the real time example of encapsulation?
What is abstraction in oops?
What are properties in oop?
is there any choice in opting subjects like 4 out of 7
Describe these concepts: Polymorphism, Inheritance and Abstraction.
What is abstraction and encapsulation?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
How do you answer polymorphism?
What is abstraction in oops with example?
What is encapsulation in oops?