Chapter 5. Operators, Expressions, and Statements

You will learn about the following in this chapter:

  • Keyword

    while
    
  • Operators

    = - * /
    % ++ - - (type)
    

This chapter introduces you to C's multitudinous operators, including those used for common arithmetic operations. You learn about operator precedence and the meanings of the terms statement and expression. Then you encounter the handy while loop. Compound statements, automatic type conversions, and type casts are next. Finally, you see how to write functions that use arguments.

Now that you've looked at ways to represent data, let's explore ways to process data. C offers a wealth of operations for that purpose. You can do arithmetic, compare values, modify variables, combine relationships logically, ...

Get C Primer Plus®, Third Edition 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.