Tagged: Relational Operators

1

Programming In C: Relational and Logical Operators

Being able to compare the values of variables is extremely important in any C program.  Later on we’ll cover how we can alter the flow of a program depending on the results of relational and logical operators, in essence creating programs or processes that can somewhat “think” for themselves.  C provides an AND, OR, and NOT operators, but from these operators we can easily build any kind of more complex boolean logic operation, as we have done above with exclusive or (XOR).