+ 2
while(true) for this condition ,true is keyword? Or value of true will be considered ,0 will be taken as false otherwise true?
Conditional operators in c++
1 Resposta
+ 9
true is a keyword and a boolean value too. Its value is 1.
while(true) is same as while(1) which means keep running this loop as long as it is true, in simple words it's an infinite loop.