Control In Plain C

Control constructs in plain C are the same, with the exception of the for-each style loop, which is C++ only. The increment operators are also the same in both languages.

If you want to make a bool variable declaration in plain C, or use the constants true and false, you need to #include <stdbool.h>. (That's a simplification of a long story.) This include is not required just to use the control constructs.

The <stdbool.h> header was introduced in the 1999 C standard. Before then (and probably still), it is common to create versions of these using #define:

#define BOOL int #define TRUE 1 #define FALSE 0
which defines the symbols BOOL, TRUE and FALSE as shown. You will often see this in plain C code, or see the those upper-case symbols used in plain C.