C Operators

In C programming language, operators are used to perform different operations on data values. There are various types of operators, such as arithmetic, relational, logical, bitwise, assignment, conditional, and increment/decrement operators. In this table, we will discuss each type of operator in detail:

OperatorDescriptionExample
Arithmetic OperatorsUsed to perform mathematical operations+, -, *, /, %
Relational OperatorsUsed to compare two values>, <, >=, <=, ==, !=
Logical OperatorsUsed to combine two or more conditions&&, `
Bitwise OperatorsUsed to perform operations on binary values&, `
Assignment OperatorsUsed to assign values to variables=, +=, -=, *=, /=, %=, &=, `
Conditional OperatorsUsed to make decisions based on conditions? :
Increment/Decrement OperatorsUsed to increment or decrement the value of a variable++, --

Arithmetic Operators:

Arithmetic operators are used to perform mathematical operations. The table below shows the arithmetic operators in C programming language:

OperatorDescriptionExample
+Additiona + b
-Subtractiona - b
*Multiplicationa * b
/Divisiona / b
%Moduloa % b

Relational Operators:

Relational operators are used to compare two values. The table below shows the relational operators in C programming language:

OperatorDescriptionExample
>Greater thana > b
<Less thana < b
>=Greater than or equal toa >= b
<=Less than or equal toa <= b
==Equal toa == b
!=Not equal toa != b

Logical Operators:

Logical operators are used to combine two or more conditions. The table below shows the logical operators in C programming language:

OperatorDescriptionExample
&&Logical ANDa && b
` `
!Logical NOT!a

Bitwise Operators:

Bitwise operators are used to perform operations on binary values. The table below shows the bitwise operators in C programming language:

OperatorDescriptionExample
&Bitwise ANDa & b
``Bitwise OR
^Bitwise XORa ^ b
~Bitwise NOT~a
<<Left shifta << b
>>Right shifta >> b

Assignment Operators:

Assignment operators are used to assign values to variables. The table below shows the assignment operators in C programming language:

OperatorDescriptionExample
=Simple assignmenta = b
+= 

Read More

How to Create Database in MySQL

  • By admin
  • November 27, 2021
  • 65 views
How to Create Database in MySQL

How to create table in MySQL

  • By admin
  • November 6, 2021
  • 46 views
How to create table in MySQL

MySQL commands with examples

  • By admin
  • September 11, 2021
  • 139 views
MySQL commands with examples

MySQL use database

  • By admin
  • May 28, 2021
  • 45 views
MySQL use database

System Software

  • By admin
  • May 20, 2021
  • 66 views

Introduction to software

  • By admin
  • May 13, 2021
  • 58 views
Introduction to software