Skip to main content Accessibility help
Internet Explorer 11 is being discontinued by Microsoft in August 2021. If you have difficulties viewing the site on Internet Explorer 11 we recommend using a different browser such as Microsoft Edge, Google Chrome, Apple Safari or Mozilla Firefox.

Chapter 7: Operators and Expressions

Chapter 7: Operators and Expressions

pp. 74-97

Authors

, Techno India Hooghly, West Bengal, , Techno India College of Technology, West Bengal
  • Add bookmark
  • Cite
  • Share

Extract

Operators are analogous with the verb of English language. It tells what operation has to be performed on operand(s). C language has a rich set of operators. It has 45 different operators. But it does not have any operator to calculate exponent. So, we cannot calculate ab using some operators. For this, C provides a mathematical function named pow( ). In this chapter, we will discuss about most of the operators and their use. An Expression is a combination of variables, constants and operators to produce new values. Expressions are the backbone of C statement which is analogous with the sentence of English language. In this chapter, we will discuss about these building blocks.

OPERATORS IN C

Operators are the symbols that help the programmer to instruct the computer to perform certain arithmetic, relational or logical operation. Operators are used in C language program to operate on data and variables. One of the distinguished features of C language is its rich set of operators. The operators of C can be categorized as:

  • 1. Arithmetic operators

  • 2. Assignment operators

  • 3. Increment and decrement operators

  • 4. Relational operators

  • 5. Logical operators

  • 6. Conditional operators

  • 7. Bitwise operators

  • 8. Special operators

In addition to this classification operators can also be classified as unary, binary and ternary according to the number of operands associated with the particular operator.

Arithmetic Operators

All the basic arithmetic operations used in mathematics are available in C. These operators bear more or less same meaning in other languages also. C language supports both unary and binary arithmetic operators.

About the book

Access options

Review the options below to login to check your access.

Purchase options

Paperback
US$105.00

Have an access code?

To redeem an access code, please log in with your personal login.

If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.

Also available to purchase from these educational ebook suppliers