C PROGRAMMING
MULTIPLE CHOICE QUESTION
OLD QUESTION BANK
SAMPLE QUESTION 2080 AND SOLUTION

Operators and Expressions 

 


Introduction

C supports a rich set if build in operators. An operator is a symbol that tells the computer to perform mathematical or logical manipulations. Operators are used in programs to manipulate data and variables. They usually form a part of mathematical or logical expressions. C operators can be classified into a number of categories. 

For example in the expression: c = a+b 

Operators are = and +

Operand are a,b and c

On the basis of number of operand :

  1. Unary Operator : This operator requires only one operand.
Eg: ++(increment), --(decrement)

Expression: ++a,  --b
  1. Binary operators: This operator requires two operands.
Eg: +,-,*,/

Expression: a+b,  a/b
  1. Ternary operator: This operator requires three operands.
Eg: (? :) conditional operator

Expression: (a>b)? a:b 

On the basis of function

  1. Arithmetic operators
  2. Relational operators
  3. Logical operators
  4. Assignment operators
  5. Increment and Decrement operators
  6. Conditional operator
  7. Bitwise Operator
  8. Special Operator