How True and False Boolean Values Work In C

How True and False Boolean Values Work In C

Portfolio Courses

3 года назад

38,561 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@aditidump
@aditidump - 29.05.2024 21:28

ah, i have a question:

we return 0 at the end of every function to signify successful execution. however, 0 means false. why then would we return 0 to signify error free execution of code?

also related:
we use the shorthand if(foo)/ if(foo==true) or if (!foo) /if(foo==false) to mean if (foo!=0) and if(foo=0). //note to self

Ответить
@awekeningbro1207
@awekeningbro1207 - 19.01.2024 19:52

is it possible to create a bool type from scratch?

Ответить
@fifaham
@fifaham - 23.07.2023 02:56

In one of your previous videos a person asked me why I used if(ture == SyncLock) in my code and not if(SyncLock) ! true can be 0 or 1 only, and assignment to true in this configuration (true is to the left side of the equation) for the wrong output to SyncLock (any number) will produce Warning or error (true = 253 produces error or warning), also using true = SyncLock is imune to error and wrong casting. This is my personal openion. Please advise if I am wrong or if you have any recommendation. Thank you Kevin.

Ответить
@germankoga8640
@germankoga8640 - 06.02.2023 05:58

Question, is it worth including a library just for that purpouse? because, I guess, including a library ,aka external code, waste space and resources, which makes me unsure about including a library just for that, instead of an unsigned char maybe using a typedef, thank you in advance.

Ответить
@Qwertyuio3965
@Qwertyuio3965 - 27.12.2022 19:54

I did not know of that library and I was continuosly getting error. Thank u for this nice explanation.

Ответить
@yoruichi5802
@yoruichi5802 - 16.12.2022 22:35

also bool type only use 1 byte of memory instead of 4 bytes for an int

Ответить
@standardlatinohuman
@standardlatinohuman - 14.11.2022 20:26

Helpfull. Thanks.

Ответить
@_txt_7398
@_txt_7398 - 28.10.2022 22:16

Thank you very much <3

Ответить
@user-qu3sq9fb6w
@user-qu3sq9fb6w - 21.10.2022 11:57

very good pro :D

Ответить
@ashifakhtar7371
@ashifakhtar7371 - 16.10.2022 20:10

but why any other value is true?? can you you please tell me

Ответить
@bristymarjia17
@bristymarjia17 - 08.10.2022 15:48

Thanks for the plain, simple, but excellent explanation. ❤️

Ответить
@bsykesbeats
@bsykesbeats - 16.07.2022 03:57

great breakdown

Ответить
@gabehcuodsuoitneterp203
@gabehcuodsuoitneterp203 - 17.06.2022 13:43

Is there a specifier we can use to display true / false to screen?

Ответить
@abrahao07
@abrahao07 - 15.06.2022 21:06

I really didn't know about this, like, I never needed to declare a boolean variable, but 4 years later I learned C that I declare a variable boolean, I get the error.

That's crazy.

Ответить
@jibriltenshin5668
@jibriltenshin5668 - 04.02.2022 06:27

Thank you I have assignment just like your video but i have one problem....how about this "=" (Boolean value True or False using <, >, =)

Ответить
@SimonTheFlash
@SimonTheFlash - 14.12.2021 21:56

Thank you for the explanation, it was really helpful :)

Ответить