if-else statement only works in a specific order and I don’t know why [closed]

In the first code fragment, you are not assigning to d at all. Assignment (=) operator assigns the rvalue (right hand side) to the lvalue (left hand side). This is very standard syntax.

Browse More Popular Posts

Leave a Comment