0
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!

DasElias
  • 569
  • 8
  • 19
Vanshika
  • 49
  • 1
  • 6

0 Answers0