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

What is the important feature of inheritance?

635


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1458


What are the benefits of oop?

607


What is overriding vs overloading?

584


What is pointer in oop?

539






#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2168


What is class and object with example?

585


What is the real life example of polymorphism?

609


Can abstract class have normal methods?

615


which feature are not hold visual basic of oop?

1725


What is polymorphism and types?

602


What is encapsulation selenium?

554


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1417


How to use CMutex, CSemaphore in VC++ MFC

4333


What is abstraction and encapsulation?

575