int main()
{
int y = 0;
if(y = 1)
cout<<"true"<<endl;
else
cout<<"false"<<endl;
}
Output : true
How assignment operator work here? I am unable to understand the logic!
int main()
{
int y = 0;
if(y = 1)
cout<<"true"<<endl;
else
cout<<"false"<<endl;
}
Output : true
How assignment operator work here? I am unable to understand the logic!