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


Please Help Members By Posting Answers For Below Questions

explain sub-type and sub class? atleast u have differ it into 4 points?

1840


What is the problem with multiple inheritance?

588


What is meant by multiple inheritance?

742


Can you explain polymorphism?

584


What is encapsulation in oop?

611






What is super in oop?

600


What is abstract class in oops?

603


What is use of overloading?

612


What is the real life example of polymorphism?

609


What is abstract class in oop?

537


What is multilevel inheritance?

727


Get me an image implementation program.

1562


Is abstract thinking intelligence?

601


What is the main purpose of inheritance law?

673


Can we override main method?

609