区别在于c=getchar()!=EOF是先将从设备获得的字符与EOF进行比较,然后将比较的结果赋值给c变量。而(c=getchar())!=EOF是先将获得的字符赋值给变量c,然后再与EOF比较。出现这种区别的原因是不等于!=的优先级高于赋值运算符=的优先级