everyone.

```
int x{};
if (x = 0)
std::cout << "condition true";
else
std::cout << "condition false";
```

I didnt understand why x=0 evaluates to boolean false and executing “condition false”. x=0 is an assignment,and x gets value of 0 so why it doesnt evaluate to true ?

The value of

`x=0`

is that of`x`

after the assignment.`0`

is the only integer that when converted to`bool`

is`false`

.