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 is a function in oop?
Program to read a comment string
What do you mean by variable?
What is the difference between pass by value,pass by pointer,pass by reference in the catch block in the exception handling in c++
Have you ever interfaced with a database?
What are the four main oops concepts?
What is a friend function & its advantage?
What is namespace?
What are the important components of cohesion?
2. Give the different notations for the class.\
Write a program to reverse a string using recursive function?
How compiler selects(internally) required overridden function in inheritance?
2 Answers CSC, Infinite Computer Solutions,