Chapter 5

Expressions and Operators

Abstract

This chapter covers in detail the C mathematical, relational, bitwise, assignment, increment, decrement, and some special operators. Details with examples of all the C operators are presented.

The expression makeup of operators and operands is shown, along with the use of binary, unary, and ternary operators. The reader will learn about operator precedence and evaluation direction, right to left and left to right.

Expression types are explained along with type conversion. Both the automatic conversion known as the usual arithmetic conversion and manual conversion known as type casting are explained. A brief introduction to sequence points is also included in this chapter.

Examples and exercises ...

Get Embedded C Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.