What does the code "cout<<(0==0);" print?
1) 0
2) 1
3) Compiler error: Lvalue required
Answer Posted / 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 |
Post New Answer View All Answers
How is polymorphism achieved?
What is persistence in oop?
Where You Can Use Interface in your Project
can we make game by using c
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
Why is static class not inherited?
Can enum be null?
What is the difference between inheritance and polymorphism?
What are the components of marker interface?
how to get the oracle certification? send me the answer
What is oops and why we use oops?
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
What is object and example?
What is difference between inheritance and polymorphism?
What is the real time example of encapsulation?