Quick Print – CSKC
Sign In

Search

siteicon
Solved Problem #CPP#3215 Back

Problem Statement - Output Writing – Logical Operators

Write the output of the following program and explain.

int main( )
{
int a=1,b=0;
int c=!a && b;
cout<<(c || b+a)<<endl;
cout<<(-c && a+b)<<endl;
return 0 ;
}

Solution

		 

Run Output

1
0