III Controlling Your Program s Execution

Chapter 10
The
while Loop
This and the next two chapters introduce you to C constructs, the control and looping commands in programming languages. C constructs include powerful, succinct, efficient looping commands similar to those of other languages you may already know. The while loops, taught here, enable your programs to repeat a series of statements, over and over, as long as a certain condition is always met.
This chapter teaches you the following topics:
The while statement
Looping in C
The do-while loop
The exit() function
The break statement
Using counters and totals in C programs

 



C by Example
C by Example
ISBN: 0789722399
EAN: 2147483647
Year: 1999
Pages: 43
Authors: Greg Perry

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net