O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

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

Decision Making

A special kind of program flow control allows the programmer to execute steps of a process based on the outcome of a condition test. In much the same way that an uncounted loop can be stopped when a certain condition is met, you can also define a set of steps as being executed only if a condition is met.

This might sound a little superfluous, but it is a fundamental part of programming. Without the ability to selectively execute parts of a program, the programmer’s task is made very difficult, as you have to try and plan the program in such a way that it is entirely predictable.

Anyone who has worked with food or computers knows that this is nearly impossible. In fact, most of the things that we do in life are a summation of ...

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