Published online by Cambridge University Press: 17 July 2025
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.
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.
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.
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.