C Programs - Operators
Operators are the symbol which are used to perform mathematical, logical and other operations on the operands.
Types of operators in C language -
- Arithmetic operators
- Addition
+
- Subtraction
-
- Multiplication
*
- Division
/
- Modulo
%
- Increment
++
- Decrement
--
- Relational operators
- Equal
==
- Not equal
!=
- Greater than
>
- Less than
<
- Greater than equal to
>=
- Less than equal to
<=
- Logical operators
- Logical AND
&&
- Logical OR
||
- Logical NOT
!
- Bitwise operators
- Bitwise AND
&
- Bitwise OR
|
- Bitwise exclusive OR
^
- Left shift
<<
- Right shift
>>
- Assignment operators
- Assignment
=
- Addition assignment
+=
- Subtraction assignment
-=
- Multiplication assignment
*=
- Division assignment
/=
- Remainder assignment
%=
- Conditional operators
- Ternary operator
expression 1 ? expression 2 : expression 3
- Special operators
- Size of operator
sizeof
List of programs
- C program to find sum of two numbers
- C program to perform all arithmetic operations
- C program to find perimeter of a rectangle
- C program to find area of a rectangle
- C Program to find diameter, circumference and area of a circle
- C program to convert celsius to fahrenheit
- C program to convert fahrenheit to celsius
- C program to find power of a number
- C program to find square root of a number