C Programming Operators are the symbols, used to perform mathematical, and logical operations. You can use the C Operator on individual values or variables.

Below table will show you the list of available C Programming operators with an example.

C Programming Operators | Description |
---|---|

Arithmetic Operators | The Arithmetic operators are used to perform basic mathematical calculations like Addition, Subtraction, Multiplication, Division and Modulus. For more information, Please refer Arithmetic operators in C article. |

Relational Operators | The Relational operators are mostly used either in Loops or If Statements. Use Relational operators to check the relationship between the two variables. If the relationship is true, the operator will return 1 otherwise, it will return value 0. For more information, Please refer Relational Operators in C article |

Logical Operators | The Logical Operators are used to combine two or more conditions and perform the logical operations using Logical AND (&&), OR (||), and NOT (!). |

Assignment Operators | The Assignment operators are used to assign the values to the declared variables. = (Equals) is the most commonly used assignment operator. For more information, Please refer Assignment Operators article |

Increment & Decrement Operators | Increment and Decrement Operators are used for increasing or decreasing the value by 1. ++ is used to increase the existing variable value by 1, and decrement operator – – is used to subtract or decrease the existing value by 1. For more information, Please refer to Increment & Decrement Operators article |

Bitwise Operators | Bitwise operators in C programming are used to perform bit operations. First, the decimal values will be converted into a sequence of bits ( binary values) i.e 0001, 1011 etc, and the bitwise operator will work on these bits like shifting them right to left etc. For more information, Please refer Bitwise Operators in C article |

Conditional Operator | The Conditional Operator is also known as the Ternary operator. We use Conditional Operators in the decision-making process. Depending upon the expression result this operator returns the statement. Please visit Conditional Operator in C to know the functionality. |

Sizeof Operator | sizeof operator is mostly used in finding the structure size, and array size. For more information, Please refer to Sizeof Operator article |

**C Programming Operators – Arithmetic Example**

In this example, We are going to use two variables to perform various arithmetic operations in C programming Language

// Example for C Programming Operators #include<stdio.h> int main() { int a = 24, b = 4; int addition, subtraction, multiplication, division, modulus; addition = a + b; subtraction = a - b; multiplication = a * b; division = a / b; modulus = a % b; printf("Adding of two numbers a, b is : %d\n", addition); printf("Subtracting of two numbers a, b is : %d\n", subtraction); printf("Multiplying two numbers a, b is : %d\n", multiplication); printf("Division of two numbers a, b is : %d\n", division); printf("Modulus of two numbers a, b is : %d\n", modulus); }

**OUTPUT**

## C Programming Operators – Relational Example

In this example, We are going to use two variables a and b to perform various relational operations in C programming

#include <stdio.h> main() { int a = 35; int b = 16; printf("%d > %d: %d \n", a, b, a > b); printf("%d >= %d: %d \n", a, b, a >= b); printf("%d <= %d: %d \n", a, b, a <= b); printf("%d < %d: %d \n", a, b, a < b); printf("%d == %d: %d \n", a, b, a == b); printf("%d != %d: %d \n", a, b, a != b); }

**OUTPUT**

## C Programming Operators – Assignment Example

For this example, We use the two variables x and Total to show you the working functionality of all the Assignment Operators in C Programming Language

#include <stdio.h> int main() { int x = 5; int Total = 25; printf(" Value of the Total = %d \n", Total += x ); printf(" Value of the Total = %d \n", Total -= x ); printf(" Value of the Total = %d \n", Total *= x ); printf(" Value of the Total = %d \n", Total /= x ); printf(" Value of the Total = %d \n", Total %= x ); return 0; }

**OUTPUT**

Thank you for Visiting our Blog.