View Single Post
  #4   Spotlight this post!  
Unread 12-09-2011, 08:51
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Simply question about C program

Quote:
Originally Posted by zanara View Post
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