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 429 views
2 answers 323 views
2 answers 295 views
1 answer 311 views
1 answer 191 views
6 answers 557 views
...