有以下程序  #include<stdio.h>  #include<string.h>  main()  {char

有以下程序
  #include<stdio.h>
  #include<string.h>
  main()
  {char x[]=”STRING”;
  x[0」=0;x[1]=’\0’;x[2」=’0’;
  printf(”%d %dn”,sizeof(x),strlen(x));
  }
  程序运行后的输出结果是
61955249 1年前 已收到1个回答 举报

阳光有点刺眼 幼苗

共回答了14个问题采纳率:92.9% 举报

你一该这样分析
main( )
{ int a=3,b=4,c=5,d=2;
if(a>b)
{if(b>c)
printf("%d",d++ + 1 );
else
printf("%d", ++d + 1);

printf("%dn",d);
}
因为a>b不成立,所以直接打印d。你现在明白了吗?

1年前

1
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 0.063 s. - webmaster@yulucn.com