O'Reilly logo

C Primer Plus, Fourth Edition by Stephen Prata

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 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 ...

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