HTML/JavaScript

Operator In C || What Is Operator And Its Uses In C

 

Operator: An Operator is a symbol that is used to perform operations on operands in any programming language.


Operand – It is the data on which the operation of the operator occurs.

Types of Operators in C Language -:

  • Arithmetic Operators
  • Relational Operators
  • Logical Operators
  • Bitwise Operators
  • Assignment Operators



  • Arithmetic Operators -: It is the type of operators that take numerical values (literal or variable) as their operands and perform some operation on them and return a single numeric value.
  • Relational Operator -: It checks the relationship between two or more operands or it compares two or more operands.

  • ·      If the comparison or relationship is true, then it returns 1.

    ·      If the comparison or relationship is false, then it returns 0.


    Let us assign a=8 and b=4.

                                

    • Logical Operators :


    Let a=0 and b=10.

                           

    • Bitwise Operators: These operators work on binary digits i.e. bits and perform bit by bit operations.

    ·      ~ is the binary one’s complement operator.

    ·      << is the binary left shift operator.

    ·      >> is the binary right shift operator.

  • Assignment Operators: 


  • Miscellaneous Operators : 



Post a Comment

0 Comments