2011.1.18 运算符优先级

今天在调试网络编程中的代码中的问题,对==  和 = 的优先级应用欠妥

写了个 example:

 

 

#include <stdio.h>

 

 

#include <stdio.h>

int main(int argv, char** argc)
{
        int a = 0 == 0;
        printf("ais %d", a);

        /*if(a = 0 == 0)
        {
                printf("等号的优先级高\n");
        }
        else
        {
                }*/
}

 

 

posted @ 2011-01-18 12:54  lxgeek  阅读(354)  评论(0编辑  收藏  举报