I have seen and
keyword being used inside if
statement just like &&
operator.
Is there any difference between these (and
, &&
) ?
#include <iostream>
using namespace std;
int main()
{
bool a = true;
bool b = true;
if(a==true and b==true) // if(a==true && b == true)
{
cout << "YES ";
}
return 0;
}