HOME | LAB PROGRAMMING | RATIONAL ROSE DIAGRAM | COMPUTE GRAPHICS | CLASS DIAGRAM | NETWORK PROGRAMING | BEST OF THE SITE

Logical operator And(&&) OR(||) operator

0II0=?
0II1=?
0II 2=?

0&&1=?
0&&2=?
1&&0=?
1&&1=?
2&&1=?
Tutorial answer:
0II0=0
0II1=1
0II2=1

0&&1=0
0&&2=0
1&&0=0
1&&1=1
2&&1=1
Debugging solution:Or operator if any one variable is one or greater than one then the result is one
And&& operator if two variable must is greater than one then only the result is one. other wise result is zero.

0 comments: