O'Reilly logo

C by Nikolaos D. Tselikas, George S. Tselikis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4

Operators

Now that you’ve been introduced to the concepts of C data types, variables, and constants, it is time to learn how to manipulate their values. C provides a rich set of operators that are used to build expressions and perform operations on them. In this chapter, we’ll present some of C’s most important operators. We’ll introduce the rest gradually over the next several chapters, and you’ll see how to apply them when building more complex programs.

Assignment Operator

The = operator is used to assign a value to a variable. For example, the statement a = 10; assigns the value 10 to the variable a, while the statement a = k; assigns the value of the variable k to a.

When used in a chained assignment, the assigned value is stored ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required