1) For c being int:
In a normal situation if you want to check if c has value 1 or 0 you would use the first condition. At least the first modified as @hamsterman mentioned: if ((c==1)||(c==0)).
Second condition is totally wrong since it's always false (0). There is no way c could have 2 different values at the same time.
2) For c being bool:
Both are useless (as second in previous case) as they have fixed evaluation:
1 and 0 respectively.
int c=3;
if ((c==1) || (c==0)) //c == 1 NOT c = 1
{
cout<<"hello ";
}
else
{
cout <<"bye";
}
and the output would be
bye
bye
because
c = 3
doesnt fit any condition of the above.
And moreover, on the second case, it will always be "bye" as you cant have 2 values for one variable at the same time
if( x ) is the same as if( x != 0 ) and x = ... //returns ... therefor if( x = 1 ) is the same as if( (x = 1) != 0 )
which is the same as if( 1 != 0 ) which is always true!