Sep 21, 2017 #1 V 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;
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;
Sep 21, 2017 #2 S srizbf Advanced Member level 5 Joined Apr 3, 2010 Messages 1,992 Helped 417 Reputation 840 Reaction score 329 Trophy points 1,363 Activity points 10,985 ! 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.)
! 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.)