0% found this document useful (0 votes)
2 views1 page

Types of Operators in C

The document outlines the types of operators in C programming, including arithmetic, relational, logical, and assignment operators. Each type is described with its purpose and examples of usage. This serves as a guide for understanding how to perform various operations in C.

Uploaded by

Prisca Cherono
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Types of Operators in C

The document outlines the types of operators in C programming, including arithmetic, relational, logical, and assignment operators. Each type is described with its purpose and examples of usage. This serves as a guide for understanding how to perform various operations in C.

Uploaded by

Prisca Cherono
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Types of Operators in C:

Arithmetic Operators: These are used for basic mathematical operations.

Operator Description Example


+ Addition a + b
- Subtraction a - b
* Multiplication a * b
/ Division a / b
% Modulus (remainder) a % b
Relational Operators: These are used to compare two values, returning either true (1) or false
(0).

Operator Description Example


Operator Description Example
== Equal to a == b
!= Not equal to a != b
> Greater than a > b
< Less than a < b
>= Greater than or equal to a >= b
<= Less than or equal to a <= b

Logical Operators: These operators are used to combine two or more conditions or
expressions.

Operator Description Example


&& Logical AND a && b

|| Logical OR x < 5 || x < 4


! Logical NOT !a

Assignment Operators: These are used to assign values to variables.

Operator Description Example


= Assign a = 5
+= Add and assign a += 5
-= Subtract and assign a -= 5
*= Multiply and assign a *= 5
/= Divide and assign a /= 5
%= Modulus and assign a %= 5

You might also like