why we use bool functions in c! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why we use bool functions in c!

using this we return functions.

7th Jan 2017, 2:09 PM
Rindi Hasan
Rindi Hasan - avatar
2 Answers
+ 6
Use it to return in if statement so get any data return true instead of 0 or 1
7th Jan 2017, 2:18 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 2
I posted a simple easy code to determine if a number is prime. I used a function that returns a bool value to determine if a number is prime. The result is true if the parameter passed as an integer it is a prime, or false if not.. Check my code here: https://code.sololearn.com/c8gjJwr0o455/?ref=app
7th Jan 2017, 4:12 PM
Michael Isac Girardi
Michael Isac Girardi - avatar