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 |
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
What is persistence in oop?
What are the access specifiers avaible in c++?
Can an interface inherit a class?
what are the different types of qualifier in java?
what is ltti
what is the use of mutable key word
What are the main differences between procedure oriented languages and object oriented languages?
9 Answers IBM, Infosys, Wipro,
WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP
Write a macro for swapping integers
Difference between vector and array
what are the realtime excercises in C++?