if-else选择结构

来源:互联网 发布:电脑一天用多少数据 编辑:程序博客网 时间:2024/06/05 17:41

if_else选择结构语句只对表达式进行两种结果的判断,真或者假,

if语句只判断真假,0为假,非0为真

int a=0;
   if(!a){
       printf("hehhehehhe\n");
   }

输出“hehhehehehehe”

int a=-1;
   if(!a){
       printf("hehhehehhe\n");
   }

不输出


0 0
原创粉丝点击