Computer Studies
Define the following with two examples of each:
(a) Arithmetical Operator
(b) Relational Operator
(c) Logical Operator
QBASIC: Character Sets
45 Likes
Answer
(a) Arithmetical Operator
Arithmetical operators are used to perform mathematical calculations in a program. These operators work in the same sequence in which they are used in mathematics.
For example- addition (A + B), subtraction (A - B).
(b) Relational Operator
A relational operator is used to determine the relationship between two or more operands. The relational operator checks the condition and returns the result in either 'true' or 'false' for further processing.
For example- less than (A < B), greater than (A > B).
(c) Logical Operator
Logical operators are needed to compare two or more expressions. These operators give result in 'true' or 'false', depending upon the outcome of the logical expressions.
For example:
AND ⇒ ((A = B) AND (B = C))
NOT ⇒ (NOT(A = B))
Answered By
27 Likes