|
Re: Simply question about C program
Quote:
Originally Posted by zanara
I am a newbie and have little knowlege about programming. I do not understand the role of the logical operators-AND-OR NOT C, and how are they used? Looking forward to your response!
|
if ( a && b) {do something if a AND b are both true}
if ( a || b) {do something if either (or both) a OR b is true. ie, a and b are not both false.}
if ( !a) {do something if a is NOT true}
Last edited by Ether : 12-09-2011 at 13:42.
Reason: edited for clarity
|