I am aware that when a non zero value is provided as a condition in an if statement, the condition is evaluated to be true.
Yet, I'm wondering how an assignment(=) is evaluated to be true here, instead of a comparison(==), and runs without any errors in the below C program.
int main(){
int a, b =5;
if(a=10) {
("This works");
}
if(b=1){
("This works too");
} }