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
Why do we need oop?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
Why do we use encapsulation in oops?
Describe these concepts: Polymorphism, Inheritance and Abstraction.
Can abstract class have normal methods?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What does enum stand for?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
Why do we use inheritance?
What are two types of polymorphism?
How many human genes are polymorphic?
What is for loop and its syntax?
What is inheritance in oop?
What are the types of abstraction?
What is stream in oop?