Professional Documents
Culture Documents
Assignment 3
Assignment 3
example: 5 + 3 = 8, 5 - 3 = 2, 2 * 4 = 8, etc.
Binary operators act upon two operands to produce a new value. Such, operators can be
classified into different categories.
Eg: a+b, a-b etc
Operator that takes a single operand/argument and performs an operation is called unary
operator. A unary operation performs an operation with only one operand.
Eg: a++
Relational operators are used to compare two values in C language. It checks the relationship
between two values. If relation is true, it returns 1. However, if the relation is false, it returns
0.
Eg: ==, <,>, <=,>=, != etc.
5.Logical operators
These operators are used to perform logical operations on the given expressions. There are 3
logical operators in C language. They are, logical AND (&&), logical OR (||) and logical
NOT (!).