+ 19

What will be the output

while('\n') { cout<<"hello\t"; }

11th Mar 2017, 3:57 PM
Mansi Dagla
Mansi Dagla - avatar
8 Answers
+ 15
Because any conditional statement which is not false or 0 is automatically true, and hence your while loop will always run.
11th Mar 2017, 4:01 PM
Hatsy Rei
Hatsy Rei - avatar
+ 15
thanks
11th Mar 2017, 4:01 PM
Mansi Dagla
Mansi Dagla - avatar
+ 14
but why
11th Mar 2017, 4:00 PM
Mansi Dagla
Mansi Dagla - avatar
+ 11
Infinite "hello\t"s.
11th Mar 2017, 3:59 PM
Hatsy Rei
Hatsy Rei - avatar
+ 8
infinite loop :)
10th Jun 2017, 2:41 PM
Fuyuka Ayumi(ć†ŹèŠ±)
+ 6
Probably we get a compilation error missing 'main ()'
12th Mar 2017, 6:00 AM
Shirious
Shirious - avatar
+ 5
Why don't you run this code and hang up your device
12th Mar 2017, 5:59 AM
Shirious
Shirious - avatar
+ 1
Infinite time hello
23rd Mar 2017, 4:15 PM
Abhishek Arora
Abhishek Arora - avatar