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 |
Write a program to accept a number and to print numbers in pyramid format? for eg:for a no. 5 1 212 32123 4321234 543212345
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
what is virtual function in c++
difference between class and object
10 Answers Chandan, IBM, Magic Soft,
what is polymorpsim? what are its types?
What are the main differences between procedure oriented languages and object oriented languages?
9 Answers IBM, Infosys, Wipro,
How do you answer polymorphism?
What is virtual class and friend class?
Write an operator overloading program to Overload ‘>’ operator so as to find greater among two instances of the class.
what is difference between c++ language and java language
wht is ditch
What is the real time example of inheritance?