Launch your tech mastery with us—your coding journey starts now!
Course Content
Basic Syntax and Data Types
0/2
Arrays and Strings
0/2
Structures in C
0/1
Dynamic Memory Management
0/1
Command Line Arguments
0/1
Preprocessor Directives
0/1
C Programming

What are Operators?

Operators are symbols used to perform operations on variables and values.
Example:

int a = 10 + 5; // ‘+’ is an arithmetic operator

  • Types of Operators in C:

Type

Operators

Description

Arithmetic

+, -, *, /, %

Basic mathematical operations

Relational

==, !=, >, <, >=, <=

Compare two values

Logical

&&, `

 

Assignment

=, +=, -=, *=, /=, %=

Assign values to variables

Increment/Decrement

++, —

Increase or decrease by 1

Bitwise

&, `

, ^, ~, <<, >>`

Conditional (Ternary)

condition? expr1 : expr2

Short form of if-else

Special

sizeof, &, *

Size, address, and pointer ops