4

CHAPTER

Control Structures

CHAPTEROUTLINE —•  4.1 Introduction
—•  4.2 Decision-Making Statements
—•  4.3 The if-else Statement
—•  4.4 The Nested if–else Statement
—•  4.5 The jump Statement
—•  4.6 The goto Statement
—•  4.7 The break Statement
—•  4.8 The continue Statement
—•  4.9 The switch case Statement
—•  4.10 The Nested switch( )case Statement
—•  4.11 Loops in C/C++
—•  4.12 The for Loop
—•  4.13 Nested for Loops
—•  4.14 The while Loop
—•  4.15 The do-while Loop

4.1 INTRODUCTION

This chapter deals with the basics of control structures of C++ language. Those who are already familiar with C, may skip this chapter. Those who are new to C++, should read this chapter thoroughly. As discussed earlier, ...

Get Object-Oriented Programming with ANSI and Turbo C++ 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.