Skip to main content Accessibility help
×
Hostname: page-component-6bb9c88b65-dwch4 Total loading time: 0 Render date: 2025-07-25T02:11:47.365Z Has data issue: false hasContentIssue false

7 - Operators and Expressions

Published online by Cambridge University Press:  17 July 2025

Subrata Saha
Affiliation:
Techno India Hooghly, West Bengal
Subhodip Mukherjee
Affiliation:
Techno India College of Technology, West Bengal
Get access

Summary

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.

Information

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2016

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Book purchase

Temporarily unavailable

Accessibility standard: Unknown

Accessibility compliance for the PDF of this book is currently unknown and may be updated in the future.

Save book to Kindle

To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×