首页/ 题库 / [单选题]以下程序的输出结果是( )。 #inCl的答案

以下程序的输出结果是( )。 #inClude<stdio.h> main() { int a,b,d=241; a=d/100%9; b=(-1)&&(+1); printf("%d,%d",a,b); }

单选题
2022-06-15 21:28
A、6,1
B、2,1
C、6,0
D、2,0
查看答案

正确答案
B

试题解析
解析:变量a、b和d被定义为整型,所以d/100的值为2,2%9的值为2,则a=2。运算符&&表达式的值为非零值则整个逻辑表达式的值为真,即b=1。所以,选项B正确。

标签:
感兴趣题目
以下程序的输出结果是( )。 #inClude<stdio.h> main() { int a,b,d=241; a=d/100%9; b=(-1)&&(+1); printf("%d,%d",a,b); }
以下程序的输出结果是( ) #include<stdio.h> main() {int a,b, d=241; a=d/100%9 b=(-1)&&(+1); printf("%d,%d,a,d");}
下列程序的输出结果是( )。#include<stdio.h>main(){ int a=4 printf("%d ",(a+=a-=a*A) );}
下列程序的输出结果是( )。 #include<stdio.h> main() { int a=4; printf("%d ",(a+=a-=a*a)); }
下列程序的输出结果是______。 #include<stdio.h> main () { int a=2,c=5; printf("a=%%d,b=%%d ",a,c); }
下列程序的输出结果是( )。#include<stdio.h>main(){ int a=4;printf("%d\n",(a+=a-=a*A) );}
下列程序的输出结果是( )。 #include<stdio.h> main() { int a=4; print f("%d ", (a+=a-=a*a)); }
有以下程序: #include <stdio. h> main( ) { unsigned int a; int b=-1; a=b; printf(" % u", a);程序运行后的输出结果是( )。
有以下程序 #include<stdio.h> main() { int a=5,b=lt; t=(a<<2)|b;printf("%d ",t); } 程序运行后的输出结果是______。
有以下程序 #include<stdio.h> void main() { int a=1,b=0; printf("%d,",b=(a++)+(a++)); pfintf("%d ",a+B); } 程序运行后的输出结果是( )。
有以下程序: #include<stdio.h> main() { int a=1,b=2,c=3,x; x=(a^B)&c;printf("%d ",x); } 程序的运行结果是( )。
以下程序的输出结果是( )。 #include <stdio.h> main() { int a=21,b=11; printf("%d ",--a+b,--b+a); }
相关题目
以下程序的输出结果是 ( ) #include<stdio.h> main() {struct stru{int a,b: char c[6]; }: printf("%d ",sizeof(stru)), }
有以下程序:#include main(){ int x=011; printf(%d,++x);}程序运行后的输出结果是(  )。
有以下程序(其中k的初值为八进制数):#include main(){ int k=011; printf(%d,k++);}程序运行后的输出结果是(  )。
有以下程序:#include #include main(){ char a[20]=ab,b[20]=cdef; int k=0; strcat(a,b); while(a[k]!='\0') {  b[k]=a[k];  k++; } puts(b);}程序的运行结果是(  )。
有以下函数:#include main(){ int a=12,c; c=(a<<2)<<1; printf(%d,c);}程序运行后的输出结果是(  )。
有以下程序: #include <stdio.h> fun(int x,int y,int z) { z=x*y;} main() { int a=4,b=2,c=6; fun(a,b,c); printf("%d",c); } 程序运行后的输出结果是( )。
有以下程序:#include main(){ int a=3; int b=3; printf(%d, a&b);}程序运行后的输出结果是(  )。
有以下程序:#include int fun(int a,int b){ if(b==0)return a; else return(fun(--a,--b));}main(){ printf(%d,fun(4,2));}程序运行的结果是(  )。
有以下程序:#includestruct S{int a;int *b;};main(){ int x1[] = {3,4},x2[] = {6,7}; struct S x[] = {1,x1,2,x2}; printf(%d,%d,*x[0].b,*x[1].b);}程序的运行结果是(  )。
有以下程序#includeint fun(int a,int b){ return a+b;}main(){ int x = 6,y=7,z = 8,r; r = fun(fun(x,y),z--); printf(%d,r);}程序运行后的输出结果是(  )。
有以下程序: #include<stdio.h> main( ) { int a=-2,b=0; while(a++++b); printf("%d,%d ",a,b); } 程序运行后的输出结果是( )。
以下程序的输出结果是( )。 #include <stdio.h> main() { int n=4; while(n--) printf("%d ",--n); }
下列程序的输出结果是( )。 #include <stdio.h> int b=2; int func(int *a) { b+=*a;return(b);} main() { int a=2, res=2; res+=func(&a); printf("%d ",res); }
以下程序的输出结果是()#includemain(){inta=1,b=2,c=3;printf(“%d”,c>b>A;}
有以下程序#include main(){ int i=1; i=i^i; printf(%d,i);}程序运行后的输出结果是(  )。
以下程序的运行结果是 ( ) # include<stdio.h> main( ) { int a=015,b=22; printf("%d,%d ",a+ +,- -b); }
有以下程序: #include <stdio.h> main( ) { int a=7; while(a--); print[("%d ",a); } 程序运行后的输出结果是( )。
有以下程序: #include <stdio.h> main( ) { int a=2,b; b=a<<2;printf("%d ",b); } 程序运行后的输出结果是( )。
以下程序的输出结果是______。 #include<stdio.h> main() { int a,b,d=241; a=d/100%9; b=(-1)&&(-1); printf("%d,%d",a,b); }
以下程序的输出结果是( )。 #include<stdio.h> main() {int a=4,b=3,c=2,d=1; printf("%d",a<b?a:d<c?d:B); }
广告位招租WX:84302438

免费的网站请分享给朋友吧