Cafè Linux
575 subscribers
14 photos
7 videos
31 files
31 links
👾 ( Cafe Linux - C, Linux, BASH and so on )

🎥 YT: https://www.youtube.com/@TheLinuxCafe

( "The quieter you become, the more you are able to hear" )

Buy me a Coffee : { 0xbc8e52af7b46461b8076085Be771F465E26A9Dfd } - BEP20/USDT

whoami: @firstTarokh
Download Telegram
_Bool in C 👨‍💻

Do we have BOOL in C ?

We do have! and it is widely used in modern embedded projects for better readability, btw many low-level codes still use 0/1 instead of BOOL due to older compiler support, or coding standards.


Since C99:


#include <stdbool.h>

bool flag = false;
if (!flag) {...}

bool is a MACRO for _Bool

You can also use _Bool like this:



_Bool flag = false;


#cprogramming #notes #boolean @tcafeLinux
Please open Telegram to view this post
VIEW IN TELEGRAM
5❤‍🔥21