Chapter 6. C Control Statements: Looping

You will learn about the following in this chapter:

  • Keywords:

    for

    while

    do while

  • Operators:

    < > >=

    <= != == +=

    *= -= /= %=

  • Functions:

    fabs()

  • C's three loop structures—while, for, and do while

  • Using relational operators to construct expressions to control these loops

  • Several other operators

  • Arrays, which are often used with loops

  • Writing functions that have return values

Powerful, intelligent, versatile, and useful! Most of us wouldn't mind being described that way. With C, there's at least the chance of having our programs described that way. The trick is controlling the flow of a program. According to computer science (which is the science of computers and not science by computers…yet), a good language should provide ...

Get C Primer Plus, Fourth 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.