更多“有以下程序:include<stdio.h>main(){int a=2,b=2,C=2;print{("%d\n",a/b&”相关的问题
第1题
有以下程序 #include <stdio.h> main() { int a=5,b=1,t; t=(a<<2|b); printf("%d\n",t); }> A、21
点击查看答案
第2题
以下程序 #include <stdio.h> main() { int a = -2, b = 0; while (a++ && ++b) ; printf("%d,%d\n", a, b ); } 程序运行后输出结果是 (难度系数★★)
点击查看答案
第3题
有以下程序 #include <stdio.h> main() { int a=2, c=5; printf( "a=%%d,b=%%d\n", a,c ); } 程序的输出结果是( )
A、a=2,b=5
B、a=%2,b=%5
C、a=%d,b=%d
D、a=%%d,b=%%d
点击查看答案
第4题
有以下程序
#include
main()
{ int a=7;
while(a--);
printf("%d\n",a);
}
程序运行后的输出结果是
A.-1
B.0
C.1
D.7
点击查看答案
第5题
#include <stdio.h> main() { int a = 3; do { printf("%d,", a-=2 ); } while( ! (--a) ); printf("\n"); } 程序运行后的输出结果是 (难度系数★★★)
点击查看答案
第6题
有以下程序 #include <stdio.h> main() { int c,d; c = 10 | 5; d = 10 + 5; printf("%d,%d\n", c, d); } 程序的运行结果是( )
A、15,15
B、10,15
C、5,15
D、105,15
点击查看答案
第7题
#include <stdio.h> int main() { int a,b,c; a=10; b=23; c=a+b; printf("a+b="); printf("%d\n",c); return 0; } 该程序的运行结果是
点击查看答案
第8题
1. 阅读并分析程序 #include <stdio.h> int main() { char c1,c2; c1=’a’; c2=’b’; printf(“c1 is %c\nc2 is %c\n”,c1,c2); printf(“c1 is %d\nc2 is %d\n”,c1,c2); return 0; } l 请问,程序的运行结果是 。 l 请增加一条语句,用十六进制格式输出c1和c2的数值。 请增加:使c1的值加3,c2的值减1,并重新输出c1和c2的数值。
点击查看答案
第9题
以下程序的输出结果为#include <stdio.h> int main() { int a=2, c=5; printf("a = %%d, b = %%d\n", a, c); return 0; }
A、a = %d, b = %d
B、a = %2, b = %5
C、a = 2, b = 5
D、a = %%d, b = %%d
点击查看答案