04-29-2011, 08:48 AM
what is bool why we use it with the function what is it benefit
|
what is bool why we use it with the function what is it benefit ?
|
|
04-29-2011, 08:48 AM
what is bool why we use it with the function what is it benefit
04-29-2011, 08:48 AM
bool is a primitive data type, that is used to declare a variable whose value will be set as true (1) or false (0). To declare such a value, we use the bool keyword. We use bool in such situation, where the result may be true or false.
Example: There is an operation validatePIN. This operation returns a value indicating either that the operation was successful in performing its task (i.e., a return value of true) or that it was not (i.e. a return value of false). bool validatePIN (int); // is user-specified Pin correct? Best Regards! 0300-9520262 Get solution in 24 hour |cpmputer & internet mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
|
|
« Next Oldest | Next Newest »
|