How to use the built-in type _Bool in C

1 Answer

0 votes
#include <stdio.h>

int main(void) 
{
    _Bool a = 1; 
    _Bool b = 0;
    
    if (a) 
    {
        puts("a = true");
    }
    if (!b) 
    {
        puts("b = false");
    }
    
    return 0;
}
    
/*
run:
 
a = true
b = false

*/

 



answered Aug 23, 2017 by avibootz

Related questions

1 answer 329 views
2 answers 192 views
2 answers 182 views
1 answer 236 views
2 answers 180 views
2 answers 225 views
1 answer 129 views
...