+ 3

Anyone can guide me how the following statement executes

bool result=true; if(result) { cout<<"true"; }

28th Jun 2017, 9:39 AM
Muhammad Kaleem Ullah
Muhammad Kaleem Ullah - avatar
5 ответов
+ 5
if statement tests for true condition so if(result) is the same as writing if(result == true)
28th Jun 2017, 9:51 AM
jay
jay - avatar
+ 5
You are welcome!
28th Jun 2017, 9:53 AM
jay
jay - avatar
+ 4
if result is true print true
28th Jun 2017, 9:47 AM
jay
jay - avatar
+ 2
is it mean condition is true then it it true?
28th Jun 2017, 9:47 AM
Muhammad Kaleem Ullah
Muhammad Kaleem Ullah - avatar
+ 2
Thanks Bro.
28th Jun 2017, 9:52 AM
Muhammad Kaleem Ullah
Muhammad Kaleem Ullah - avatar