C Programming Reference >> C Basic Tutorials >> C Keywords Home >> _Boolui 30/12/06 - Views - Ratings : C99 has introduced this new data type similar to C++ bool. This data type can store only two values true or false represented by 0 or 1 (Non Zero) respectively. Also true and false macro defined in header <stdbool.h> Code - void function (void)
{
int a;
_Bool b = true;
for (a = 0; b; b;a++)
{
printf ("%d", a); \\ Prints numbers 0 to 9
b = (a<10);
}
}
|