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 / sanish joseph
hey guys ans is 1.
coz (0==0)retuns 1as it is true;
Is This Answer Correct ? | 16 Yes | 1 No |
Answer / g.narsing
answer is 1 because (0==0)which is a true value
true=1
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / sumeet sharma
the ans is 1 because '==' operator on equality returns '1'
for true and returns '0' for false or inequality.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / ankesh kumar
Output of this question will be 1,
becoz on comparision(0==0) it will print the value true ie
1.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / vivek satasia
Every expression or functon in programming paradigm works on
TRUE means 1 or FAlSE means o value.Ex- u can check this,
Suppose u write function like clrscr().It also returns
value.U can store it's value in a variable and can print
that variable.Like this expressio is first evaluated in from
of 0 or 1.
Here expression is 0==0 which is tru so it returns 1.
So,ans=1.
Is This Answer Correct ? | 1 Yes | 0 No |
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
Write an operator overloading program to write S3+=S2.
What is debug class?what is trace class? What differences are between them? With examples.
write a programe to calculate the simple intrest and compund intrest using by function overlading
i got a backdoor offer in process global,Bangalore..Can i work with it?
Why is oop better than procedural?
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?
Why static Function is used in C++?
What is the real time example of inheritance?
Why do we use class in oops?
How can you overcome the diamond problem in inheritance?
char* ptr = "Rahul"; *ptr++; printf("%s",ptr); What will be the output