Q: 17.4 ΪʲôһЩд if(0==x) if(x==0)


A: һֳֹСϷ

  if (x = 0)

ϰ߰ѳд==֮ǰᱨżд

  if (0 = x)

ȻһЩ˵סתԱȼס=ŸסȻżд===һоijԱҲ᷸Ĵִ󡣣

һ棬һЩ˷ЩתIJԺܳªӦö if(x = 0) 档ʵȷʵеĸֵ棬Ȼǿд if((x = expression)) if((x = expression) != 0) ˼

οH&S Sec. 7.6.5 pp. 209-10


(This Chinese translation isn't confirmed by the author, and it isn't for profits.)

Translator : jhlicc@gmai1.c0m
Origin : http://www.c-faq.com/style/revtest.html