Logical AND operator

Current Categories - C-programming
 
*Logical AND operators – The operator symbol is ' && '.

->The statement is considered as true,when all the expressions or statements are true.

*Truth table -
A B A&&B
0 0    0
0 1       0
1 0       0
1 1       1

e.g -      Consider p=10, q=20,r=30,s=40
  • e=p>q && r>s then e will be zero or false.
  • e=p>q && r<s then e is false.
  • e=p<q && r>s then e is false.
  • e=p<q && r<s then e is false.

copyright@
MyFreeCopyright.com Registered & Protected
facebook-logo