C examples for Data Type:bool
What values are true, use integer as while loop controller
#include <stdio.h> int main(void) { int n = 3;//from w w w. j ava 2 s. com while (n) printf("%2d is true\n", n--); printf("%2d is false\n", n); n = -3; while (n) printf("%2d is true\n", n++); printf("%2d is false\n", n); return 0; }