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 |
Why oops is important?
What will happen when the following code is run: int x; while(x<100) { cout<<x; x++; } 1) The computer will output "0123...99" 2) The computer will output "0123...100" 3) The output is undefined
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
why we call c++ is object oriented lanaguage
why oops need in programming
Why do we use encapsulation in oops?
I am DeePu sotware engineer working with EMC corporation ,recently I had attended mcafee interview . Their questions were at heights of stupidity , I don't know what they want , I am a developer with 4 year experienced .I am listing the questions asked 1:What is the flag in g++ to avoid structure padding 2:In wht order parameters are passed to stack 3:How you will edit code segment of an exe
what isthe difference between c structure and c++ class
What are properties in oop?
What is the oops and benefits of oops programming?
What is purpose of inheritance?
what is object slicing