0% found this document useful (0 votes)
113 views12 pages

14-08-23 Kishore Sir Sent by Mistake Wrong Notes

Uploaded by

Amol Shinde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views12 pages

14-08-23 Kishore Sir Sent by Mistake Wrong Notes

Uploaded by

Amol Shinde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Logical operators [ &&, || , !

]:
&&, || used to combine two or more expressions into a
single expression.
! operator for negation. i.e. true becomes false and false
becomes true.
Note: In C compiler 0 means false and other than 0
anything is true i.e. 1.
Truth tables:
Operator Expression1 Expression2 Result
&& - and True – 1 True – 1 1
1 0 0
0 1 0
0 0 0
|| - or 1 1 1
1 0 1
0 1 1
0 0 0
!true – false
!false - true
Increment && decrement /modify operators [ ++ / -- ]:
They are used to increment or decrement a variable value by 1.
Eg:

Int a=4, b=8;

a++; i.e. a=a+1  a=5


b--; i.e. b=b-1  b=7
Note: Until assigning to any other variable, pre and post operations are same.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy