int x=110; printf("%d\n",(x++>100?x+20:x+10)); 这个打印的结果是啥?为啥是131?题目看错了,无视我吧
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 03:08:21
intx=110;printf("%d\n",(x++>100?x+20:x+10));这个打印的结果是啥?为啥是131?题目看错了,无视我吧intx=110;printf("%d\n",(x++>1
int x=110; printf("%d\n",(x++>100?x+20:x+10)); 这个打印的结果是啥?为啥是131?题目看错了,无视我吧
int x=110; printf("%d\n",(x++>100?x+20:x+10)); 这个打印的结果是啥?为啥是131?
题目看错了,无视我吧
int x=110; printf("%d\n",(x++>100?x+20:x+10)); 这个打印的结果是啥?为啥是131?题目看错了,无视我吧
(x++>100?x+20:x+10)展开表达就是:
if(x++>100)
x+20;
else
x+10;
x初始值是110,x++先取x的值110用于判断是否大于100,然后x再自加变成111;
110>100成立,所以计算x+20,由于x此时已经自加变成111,所以最终结果是111+20,即131.
int x=20;printf(“%d”,0
int x=20;printf(“%d”,0
int x=20; printf(%d
,x);呵呵
int *p1;int x=971; p1=&x,printf(%d,*(p1++));
#include int main() { int max; int x,y,z; if x>y printf(max=x); else printf(max);if max
int x=6; x += x -= x * x; printf(x = %d
,x);
void main() {int x=4;if(x++>=5)printf(%d/n,x);else printf(%d/n,x--);
#include stdio.hvoid main(void){ int a=10; int *p = &a; unsigned int b = (unsigned int)p; printf(0x%x
,p); printf(0x%x
,b); int *out = (int *)b; printf(0x%x
, *out);} 很奇怪,只能打印前两个printf,最后一个
#include main() { int x=3,y; do { y=x--; if(!y) {printf(*);continue;} printf(#); }whi下面程序段____________#include main(){int x=3,y;do{y=x--;if(!y){printf(*);continue;}printf(#);}while(1
int x='d'; printf(%c
,'A'+(x-'a'+1)int x='d';printf(%c
,'A'+(x-'a'+1)
int x = 3; do { printf(%3d,x -= 2 ); } while ( ( --x) ); ( ( --x)
谁来帮我找找错啊int max(int a,int b);void main(){int x,y,z;int max(int a,int b);printf(input two numbers:
);scanf(%d%d,&x,&y);z=max(x,y);printf(maxmum=%d,z);}int max(int a,int b);{if(a>b) return a;else return b;}------------------Con
int x,y; x=13; y=5; {printf(%d,x%=(y/=2));
main( ) {int x=3; do {printf(%d
,x-=2;} while (--x)); }
int x=3,y=4; printf(%d,%d,(x.y),(y,x));
#includemain(){int x=3;do{printf(%d
,x-=2);}while(!(--x));}
#includemain(){int x=3;do{printf(%3d
,x-=2);}while(!(--x));}
int x=23;do {printf (%d,x--);}while(!x);有没有详细一点的解释?