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 |
What do we mean by a hidden argument in C++?
what is static?
what is the difference between virtual function and destoctor?
What is polymorphism and example?
Can destructor be overloaded?
What is the difference between abstraction and polymorphism?
Should you protect the global data in threads? Why or why not?
What are the 3 pillars of oop?
What is the difference between procedural programming and oops?
what are the characteristics of oops?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
What do you mean by pure virtual functions?