Chapter 7. C Control Statements: Branching and Jumps

You will learn about the following in this chapter:

  • Keywords

    if, else, switch, continue
    break, case, default, goto
    
  • Operators

    && || ?:
    
  • Functions

    getchar(), putchar(), the ctype.h family
    

In this chapter, you learn how to use the if and if else statements and how to nest them. You use logical operators to combine relational expressions into more involved test expressions. You encounter C's conditional operator; study the switch statement; learn about the break, continue, and goto jumps; and use C's character I/O functions—getchar() and putchar(). You also learn about the family of character-analysis functions provided by the ctype.h header file.

As you grow more comfortable with C, you will ...

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.