Professional Documents
Culture Documents
Operator in a programming language is a
symbol that tells the compiler or interpreter to
perform specific mathematical, relational or
logical operation and produce final result.
A compiler is a special program that
processes statements written in a
particular programming language and turns them
into machine language or "code" that a
computer's processor uses.
TYPES OF OPERATORS
Arithmetic operators
Relational operators
Logical operators
Assignment operators
Conditional operators
Bitwise operators
Special operators
TYPES OF OPERATORS
Arithmetic Operators
Expression Result
57 != 75 True
57 == 75 False
57 <= 75 True
57 >= 75 False
57 < 75 True
Logical Operators
̶ In computer science, is a symbol or word
used to connect two or more expressions such
that the value of the compound expression
produced depends only on that of the original
expressions and on the meaning of the operator.
Expression Result
(6 > 4) AND (2 <= 14) 1st = t; 2nd = t; final = true
(6 < 4) AND (2 <= 14) 1st = f; 2nd = t; final = false
(6 > 4) OR (2 <= 14) 1st = t; 2nd = t; final = true
(6 < 4) OR (2 <= 14) 1st = f; 2nd = t; final = true
! (6 > 4) 1st = t; final = false
! ((10+2==(10))AND(13 != 7)) 1st = f; 2nd = t; 3rd = f; final = true
! ((8+2==(10))OR(13 != 7)) 1st = t; 2nd = t; 3rd = t; final = false
Assignment Operators
Age = 21
Total = 4 + 3 + 5 + 2
Stud1 = 25
Stud_2 = 19
Total = Stud1 + Stud_2