Can anyone explain what is bool and flag in c Programming . | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone explain what is bool and flag in c Programming .

bool data type flag with example

13th Aug 2018, 9:01 AM
Programmer Raja
Programmer Raja - avatar
1 Answer
+ 2
bool stands for boolean, boolean is a value that can be only 1 of 2 states true or false, or on or off, or 1 or 0 these all represent the same thing, a flag is a variable that is used in a conditional. i am unfamiliar with c language but i will show you in pseudo code below the word continue is our flag boolean continue = true; while(continue){ do some things continue = false; } once our flag continue is set to false the loop will break.
13th Aug 2018, 12:43 PM
Robert Atkins
Robert Atkins - avatar