If a Boolean value is assigned to an integer, true becomes 1 and false becomes 0. If an integer value is assigned to a Boolean, | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

If a Boolean value is assigned to an integer, true becomes 1 and false becomes 0. If an integer value is assigned to a Boolean,

explai it please

26th Sep 2017, 3:13 PM
jamsheed khanday
1 Réponse
+ 5
bool a = 1; // cout << a; will output 1 is the same as: bool b = true; // cout << b; will output 1
26th Sep 2017, 3:21 PM
Rrestoring faith
Rrestoring faith - avatar