C Programming Language
  • Home
  • C Fundamentals
    • C Character Set
    • Tokens>
      • Keywords
      • Identifiers
      • Constants>
        • Definition and Its types
        • Numeric Constants>
          • Integer Constants
          • Real Constants
        • Character Constants
        • String Constants
        • Backslash Character
      • Operators>
        • Definition and Its types
        • Arithmetic
        • Relational
        • Logical
        • Increment
        • Decrement
        • Assignment
        • Arithmetic Assignment
        • Conditional
        • Bitwise
        • Special Operators
        • Hierarchy
    • Data Types>
      • Primary (Or) Basic
      • User-Defined
      • Derived
    • Variable>
      • Definition
      • Declaration
      • Initialization
  • Control Structures
    • Decision-Control>
      • If Statement>
        • Simple-if Statement
        • if-else Statement
        • Nested-if Statement
        • if-else ladder Statement
      • Switch Statement
    • Loop Control>
      • For
      • While
      • Do-While
  • Arrays
    • Introduction
    • Single-Dimensional>
      • Definition
      • Declaration
      • Initialization
    • Two-Dimensional>
      • Definition
      • Declaration
      • Initialization
    • Multi-Dimensional>
      • Definition
      • Declaration
      • Initialization
  • Functions
    • Definition
    • Standard Library Character Functions
    • Standard Library String Functions
    • Storage Classes>
      • Definition
      • Automatic
      • Register
      • Static
      • External
  • Pointers
  • Files
    • Concepts
    • Data Files and its Categories
    • Standard Files and its Categories
  • University Questions
    • April 2001 To 2005
    • April 2006 To 2010
    • April 2011 To 2015
    • November 2001 To 2005
    • November 2006 To 2010
    • November 2011 To 2015

Operator
  • 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.
Usage
  • 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
  1. Define Operator.
  2. What is the use of an Operator?
  3. List down the various types operators available in C.
  4. List down the Arithmetic operators available in C.
  5. List down the Binary operators available in C.
  6. List down the Relational operators available in C.
  7. List down the Equality operators available in C.
  8. List down the Logical operators available in C.
  9. List down the Unary operators available in C.
  10. List down the Conditional operators available in C.
  11. List down the Ternary operators available in C.
  12. List down the Increment and Decrement operators available in C.
  13. List down the Arithmetic assignment operators available in C.
  14. List down the Shorthand assignment operators available in C.
  15. List down the Compound assignment operators available in C.
  16. List down the Bitwise operators available in C.
  17. List down the Special operators available in C.
Powered by Create your own unique website with customizable templates.