CS 1325 Lecture 4:
Document Summary
- an operator is a symbol which operates on a value or a variable. - the arguments we pass are known as operands. - arithmetic operators: +, -, *, /, %, ++, -- - note on the ++, -- this will work with integers only (pre and post ) - a == 5 is asking or testing if the value on a is equal 5; - will return a boolean value: true or false. - you can assign the result to an integer int g= 4<5; - the integer value returned by a relational if true is 1, and. - please make a note: any value different of zero is consider true. - zero is the only value considered false. - and, or, not, bitwise and, bitwise or and bitwise xor. - and and or are binary operators(two operands are needed) a b a&&b.