What does the code "cout<<(0==0);" print?
1) 0
2) 1
3) Compiler error: Lvalue required
Answers were Sorted based on User's Feedback
Answer / sneha joshi.
There will be a compilation error as we are using "(" after insertion operator "<<". We are not assigning this value to any boolean typr variable, so we cant get answer as 0 or 1.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / nitin gupta
the answer is 1 because of boolean ,if there is cout<<(0==1)
then the ans will be 0 and if there is cout<<"(0==0)" then
the ans is lvalue required
| Is This Answer Correct ? | 2 Yes | 4 No |
Explain the advantages of inheritance.
why function overloading is not called as pure polymorphism?
What is Object and Class? What are the differences between them?
function overridind means and simple program
What is overloading in oop?
what is difference between c++ language and java language
what is the difference between inter class and abstract class...?
Can we have a private virtual method ?
What is class and object with example?
why we call c++ is object oriented lanaguage
There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?
what is function over loading?