Compared with other languages, C is very compact, using fewer than 50 keywords. One reason C can get by with so few reserved words is its abundance of powerful operators—well over 30.
Most C operators are easy to understand and remember. Even if you have never seen a C program, you probably understand that the statement
val = val * 5;
multiplies the variable val by 5 and assigns the result to val.
Because the printable ASCII character set has only so many unique symbols, C uses some ASCII symbols in more than one operator. For instance, the asterisk (*) performs either a multiplication or pointer operation, depending on context. Similarly, the ampersand (&) is part of three C operators. Depending on context, the ampersand can obtain an address or perform a logical or bitwise AND operation. Be careful not to confuse operators that look similar but do different jobs.
This chapter describes the C operators, beginning with those that are common to most languages, and then discussing those unique to C.