0

how is this piece of code works. if (5) cout<<"hai"; else cout<<"hello"; how the conditional loop works ...??? I mean here what does the loop checks here and how it is checked??

24th Jul 2016, 6:28 AM
Ashok Chakri
Ashok Chakri - avatar
2 Réponses
0
Here 5 is true since it is non zero number. All numbers except 0 are true,even negative numbers
24th Jul 2016, 10:30 AM
Rahul Rajendran
Rahul Rajendran - avatar
0
if(true || 1){}else(false || 0){}
24th Jul 2016, 4:18 PM
Manvendra Singh
Manvendra Singh - avatar