What does the code "cout<<(0==0);" print?
1) 0
2) 1
3) Compiler error: Lvalue required
Answer Posted / 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 |
Post New Answer View All Answers
What is class in oop with example?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
What is for loop and its syntax?
What is oops concept with example?
What is purpose of inheritance?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
which feature are not hold visual basic of oop?
How is polymorphism achieved?
What is class and object with example?
What is abstract class in oop?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What is oops with example?
What is overloading and its types?
Why oops is important?
What does and I oop mean?