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

Why do pointers exist?

655


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?

1938


What is abstraction in oop?

628


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

690


Why do we use class?

631






What is oops and why we use oops?

569


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2027


Why is static class not inherited?

591


What are the 3 pillars of oop?

609


write a program to find 2 power of a 5digit number with out using big int and exponent ?

1891


What is object in oop?

677


Can we create object of abstract class?

575


Why do we use oops?

589


Why we use classes in oop?

575


How long to learn object oriented programming?

559