if logic in C++
if logic in C++ , the output will not display if zero of false in side bracket
#include<iostream.h>
int main()
{
if(0)
cout<<" one "<<endl;
if(false)
cout<<" two "<<endl;
if(-3)
cout<<" three "<<endl;
if(5)
cout<<" four "<<endl;
if(true)
cout<<" five "<<endl;
if(2.5)
cout<<" six "<<endl;
if('a')
cout<<" seven "<<endl;
if(0.3)
cout<<" eghit "<<endl;
system("pause");
return 0;
}
output will be three four five six seven eight