Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

what is meaning of this (!) and += operator

Status
Not open for further replies.

vead

Full Member level 5
Joined
Nov 27, 2011
Messages
285
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
india
Activity points
3,815
Hello
I have confusing on two operators ! and +=

what is meaning of this operator ! in c programming

For Example
Pin = Low Pin is set to Low
if (!pin)

Does it mean check the condition if Pin is not low ?

what is meaning of this operator += in c programming

For example

int number = 1;
number += 60;
number +=62;
return number;
 

! operator is 'logical NOT'

if Pin is set to Low , then statement

if (!Pin)
test for final state to 'HIgh'

------
+= is a shorthand notation for addition and assignment.

number += 60; is same as
number=number+60;

(operator "+=" adds the right operand to the left operand and assign the result to the left operand.)
 
  • Like
Reactions: vead

    vead

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top