+ 2
Can anyone explaine about bool keyword?
5 Respostas
+ 2
bool uses true or false boolean logic, it only requires 1 bit of memory 1/0 true/false however a byte is allocated as most cpu architecture deal with byte pointers and not bit by bit, however some older computers will allocate it as only one bit, although this is of no real matter as now days computers have millions upon billions of bytes
0
it is used for true or false,
So if the condition is not true clearly is going to be false
0
it is used for true and false if the condition is true then it will give 1 as the output and if the condition is false then the output is 0
0
bool is only two answer true or false like switch on or off .here true is equal to 1 and false equal to 0
0
bool is keyword to define a boolean data types. variable with boolean datatype can only accept true or false.