Operator
operands
Various types of Operators
C supports a rich set of operators. C operators can classified as
List of Arithmetic operators (Or) List of Binary operators
Operator Meaning
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulo operation( remainder after integer division
List of Relational operators
Operator Meaning
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
== Equal to
!= Not equal to
List of Equality operators
Operator Meaning
== Equal to
!= Not equal to
List of Logical operators
Operator Meaning
&& Logical AND
|| Logical OR
! Logical NOT
List of Unary operators
Operator Meaning
- Unary minus
++ Increment by 1
-- Decrement by 1
sizeof() Returns the size of the operand
List of Conditional operators (Or) List of Ternary operators
Operator Meaning
?: Conditional operator
List of Increment and Decrement operators
Operator Meaning
++ Increment by 1
-- Decrement by 1
List of Arithmetic assignment operators (Or) List of Shorthand assignment operators (Or) List of Compound assignment operators
Operator Meaning
+= Addition assignment
-= Subtraction assignment
*= Multiplication assignment
/= Division assignment
%= Modulus assignment
List of Bitwise operators
Operator Meaning
~ One’s Complement
<< Left shift
>> Right shift
& Bitwise AND
| Bitwise OR
^ Bitwise X-OR
List the Special operators
Operator Meaning
, Comma operator
* Pointer operator
& Address of operator
. Dot operator
-> Member Access operator
Questions
- An operator is a symbol or a special character that tells the computer to perform certain mathematical or logical manipulations which is applied to operands to give a result.
- It can operate on integer and real numbers.
- Operators are used in programs to manipulate data and variables. They usually form a part of mathematical or logical expressions.
operands
- The data items that operators act upon to evaluate expressions are called as operands.
- Most operators require two or more operands while others act upon a single operand.
- Most operators allow the individual operands to be expressions.
- A few operators permit only single variables as operands.
- The operands can be integer quantities, floating-point quantities or characters
Various types of Operators
C supports a rich set of operators. C operators can classified as
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Assignment Operators
- Arithmetic assignment Operators
- Increment and Decrement Operators
- Conditional Operator
- Bitwise Operators
- Special Operators
List of Arithmetic operators (Or) List of Binary operators
Operator Meaning
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulo operation( remainder after integer division
List of Relational operators
Operator Meaning
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
== Equal to
!= Not equal to
List of Equality operators
Operator Meaning
== Equal to
!= Not equal to
List of Logical operators
Operator Meaning
&& Logical AND
|| Logical OR
! Logical NOT
List of Unary operators
Operator Meaning
- Unary minus
++ Increment by 1
-- Decrement by 1
sizeof() Returns the size of the operand
List of Conditional operators (Or) List of Ternary operators
Operator Meaning
?: Conditional operator
List of Increment and Decrement operators
Operator Meaning
++ Increment by 1
-- Decrement by 1
List of Arithmetic assignment operators (Or) List of Shorthand assignment operators (Or) List of Compound assignment operators
Operator Meaning
+= Addition assignment
-= Subtraction assignment
*= Multiplication assignment
/= Division assignment
%= Modulus assignment
List of Bitwise operators
Operator Meaning
~ One’s Complement
<< Left shift
>> Right shift
& Bitwise AND
| Bitwise OR
^ Bitwise X-OR
List the Special operators
Operator Meaning
, Comma operator
* Pointer operator
& Address of operator
. Dot operator
-> Member Access operator
Questions
- Define Operator.
- What is the use of an Operator?
- List down the various types operators available in C.
- List down the Arithmetic operators available in C.
- List down the Binary operators available in C.
- List down the Relational operators available in C.
- List down the Equality operators available in C.
- List down the Logical operators available in C.
- List down the Unary operators available in C.
- List down the Conditional operators available in C.
- List down the Ternary operators available in C.
- List down the Increment and Decrement operators available in C.
- List down the Arithmetic assignment operators available in C.
- List down the Shorthand assignment operators available in C.
- List down the Compound assignment operators available in C.
- List down the Bitwise operators available in C.
- List down the Special operators available in C.