阅读以下程序includemain(){Int Case;float printF;printf("请输入2个数:");scanf("%d 阅读以下程序 #include<stdio.h> main() {Int Case;float printF; printf("请输入2个数:"); scanf("%d %f",Case,printF); printf("%d%f\n",Case,printF); } 以下说法正确的是( )。A.定义浯句出错,Case是关键字,不能用作用户自定义标识符,printF不能用作用户自定义标识符B.定义语句出错,Int无法被识别C.定义语句无错,scanf不能作为输入函数使用D.定义语句无错,printf不能输出Case的值

阅读以下程序includemain(){Int Case;float printF;printf("请输入2个数:");scanf("%d

阅读以下程序 #include<stdio.h> main() {Int Case;float printF; printf("请输入2个数:"); scanf("%d %f",&Case,&printF); printf("%d%f\n",Case,printF); } 以下说法正确的是( )。

A.定义浯句出错,Case是关键字,不能用作用户自定义标识符,printF不能用作用户自定义标识符

B.定义语句出错,Int无法被识别

C.定义语句无错,scanf不能作为输入函数使用

D.定义语句无错,printf不能输出Case的值


相关考题:

以下程序的运行结果是 【 9 】 。main( ){ int a=2,b=7,c=5;switch(a0){ case 1:switch(b0){ case 1: printf ("@"); break;case 2: printf("!"); break;}case 0: switch(c==5){ case 0 : printf (" * "); break;case 1 : printf(" # "); break;case 2: printf(" $ "); break;}default : printf("");}printf("\n");}

若有定义 : float x=1.5; int a=1,b=3,c=2; 则正确的 switch 语句是A)switch(x){ case 1.0: printf("*\n");case 2.0: printf("**\n");}B)switch((int)x);{ case 1: printf("*\n");case 2: printf("**\n");}C)switch(a+b){ case 1: printf("*\n");case 2+1: printf("**\n");}D)switch(a+b){ case 1: printf("*\n");case c: printf("**\n");}

阅读以下程序#include stdio.hmain(){ int case; float printF;printf(" 请输入 2 个数 : ");scanf("%d %f",case,printF);printf("%d %f\n",case,printF);}该程序编译时产生错误,其出错原因是A) 定义语句出错, case 是关键字,不能用作用户自定义标识符B) 定义语句出错, printF 不能用作用户自定义标识符C) 定义语句无错, scanf 不能作为输入函数使用D) 定义语句无错, printf 不能输出 case 的值

阅读下列程序说明和C代码,把应填入其中n处的字句写在对应栏内。【说明】下面的程序能够计算不同图形的面积。程序中把每个图形的数据定义成结构类型,利用共同体类型描述2种图形的数据。程序根据输入参数代表的图形类型,求出图形的面积并输出。【程序】struct Circle{float x,y; /*圆心位置*/float r; /*圆半径*/};struct Rectangle{float width; /*矩形宽*/float length; /*矩形长*/};union shape{struct Circle circle;/*圆数据结构*/struct Rectangle rectangle;/*矩形数据结构*/};main(){union shape a;float area;int i;printf(“input number: 1circle,2rectangle,3 end\n”);scanf("%d",i);while (1) /*循环接收输入,并计算输出*/{switch(i){case 1:printf(“input radius:\n”);scanf(“%f”, (2);/*共同体类型变量接收输入*/area=3.1415926* (3);printf(“the area of circle=%f\n”,area);break;case 2:printf(“input width and length :\n”);seanf(“%f,%f”, (4);/*共同体类型变量接收输入*/。area=(5);printf(“the area of rectangle=%f\n”,area);break;}printf(“input number:1 circle,2 rectangle,3 end\n”);scanf(“%d”,i);}}

若有定义:float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.switch(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n");}B.switch((int)x); {case 1:printf("*\n"); case 2:printf("**\n");}C.switch(a+B) {case 1:printf("*\n"); case 2+1:printf("**\n");}D.switch(a+B) {case 1:printf("*\n"); case c:printf("**\n");}

有以下程序 include main() { int n,*p=NULL; *p=n; printf(" 有以下程序 #include <stdio.h> main() { int n,*p=NULL; *p=n; printf("Input n:");scanf("%d",p);printf("output n:");printf("%d\n",p); } 该程序试图通过指针p为变量n读入数据并输出,但程序有多处错误,以下语句正确的是A.int n,*p=NULL;B.*p=n;C.scanf("%d",p)D.printf("%d\n",p);

请阅读以下程序:includemain(){int x=1,y=0,a=0,b=0;switch(x){case 1:switch(y){case 请阅读以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break;} case 2: a++,b++;break;} printf("a=%d,b=%d\n",a,b); 上面程序的输出结果是A.a=2,b=1B.a=1,b=1C.a=1,b=0D.a=2,b=2

以下程序段的运行结果是( )。 include main() {int x=2,y=1: switch(x) {case 1: switch 以下程序段的运行结果是( )。 include<stdio.h> main() {int x=2,y=1: switch(x) {case 1: switch(y) {case 0:printf("x=2,y=1\n");break; case 1:printf("y=1\n");break; } case 2:printf("x=2\n"); } }

*((int *)pval)/=2; //我想问一下,这个语法怎么理解,太复杂了 具体代码如下。 #include "stdio.h"void half(void *pval,char type);main(){ int i=20; long l=100000; float ff=12.456; double d=123.044444; printf("%d\n",i); printf("%ld\n",l); printf("%f\n",ff); printf("%lf\n",d); half( half( half( half( printf("\n%d",i); printf("\n%ld",l); printf("\n%f",ff); printf("\n%lf",d); return 0; }void half(void *pval,char type){ switch(type) { case 'i': { *((int *)pval)/=2; //我想问一下,这个语法怎么理解,太复杂了 break; } case 'l': { *((long *)pval)/=2; break; } case 'ff': { *((float *)pval)/=2; break; } case 'd': { *((double *)pval)/=2; break; } } }

以下程序的运行结果是( )。main()(int a=2,b=7,c=5;switch(a>0){case 1:switch(b<0){case 1:switch(");break;case 2:printf("!");break;}case 0:switch(c==5){case 0:printf("*");break;case 1:printf("");break;case 2:printf("$");break;}default:printf ("&");}printf("\n");}

若有以下定义,则正确的swish语句是______。 float x;int a,b;A.switch(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n"); }B.switch(x) {case 1,2:printf("*\n"); case 3:printf("**\n"); }C.switch(a+b) {case 1:printf("\n"); case 1+2:printf("**\n"); }D.switch(a+b); {case 1:printf("*\n"); case 2:printf("**\n"); }

若有以下定义:float x;int a,b; 则错误的switch语句是________。 A. switch(x){case 1.0:printf("*\n"); case 2.0:printf("*\n"); }B. switch(a){case 1:printf("*\n");case 2:printf("*\n"); }C. switch(a+b) {case 1:printf("*\n"); case 1+2:printf("*\n"); }D. switch(a+b);{case 1:printf("*\n");case 2:printf("*\n"); }

有以下程序: include main ( ) int i;for(i =0;i 有以下程序: #include <stdio.h> main ( ) int i; for(i =0;i <3 ;i ++ ) switch (i) case 0: printf(" % d" ,i); case 2: printf(" % d" , i); default: printf( "% d" , i);程序运行后的输出结果是( )。A.22111B.21021C.122D.12

以下程序的功能是:将输入的正整数按逆序输出。例如:若输入135则输出531。请填空。include <stdio.h>main(){ int n, s;printf("Enter a number:"); scanf("%d",n);printf("Output: ");do{ s=n%10; printf("%d",s); [ ]; }while (n!=0);printf("\n');}

下面的程序在编泽时产生错误,其出错原因是()。includemain(){int 1_case;float printF; 下面的程序在编泽时产生错误,其出错原因是( )。 #include<stdio.h> main() {int 1_case;float printF; printf("请输入2个数:"); scanf ("%d%f",1_case,printF); printf("%d%f\n",1_case,printF); }A.定义语句出错,1_case不能作为变量名B.定义语句出错,printF不能用作用户自定义标识符C.定义语句无错,scanf不能作为输入函数使用D.定义语句无错,printf不能输出1_case的值

执行下面程序的正确结果是 ( ) main() {float a=1.9 switch(A) { case 0:printf("0000"); case 1:printf("1111"); case 2:printf("3333"); } printf("%f",A) ; }A.1.900000B.111133331.900000C.33331.900000D.00001111233331.900000

阅读以下程序#includestdio,hmain( ){ int case;float printF;printf(“请输入2个数:”);scanf(“%d%f”,zase,rintF);prinff(“%d%f\n”,case,printF);}该程序在编译时产生错误,其出错原因是A.定义语句出错,ca8e是关键字,不能用作用户自定义标识符B.定义语句出错,pfintF不能用作用户自定义标识符C.定义语句无错,scanf不能作为输入函数使用D.定义语句无错,printf不能输出case的值

若有以下定义,则正确的switch语句是______。float x;int a,b;A.switch(x) { case 1.0:printf("*\n"); csse 2.0:printf("**\n"); }B.switch(x) { case 1,2:printf("*\n"); case 3:printf("**\n"); }C.switch(a+b) { case 1:printf("\n"); case 1+2:printf("**\n"); }D.switch(a+b); { case 1:printf("*\n"); case 2:printf("**\n"); }

阅读以下程序: #includestdio.h main( ) {int case;float printF; printf("请输人2个数:"); scanf("%d%fl"case,printF); printf("%d ofof\n",case,printF); } 该程序在编译时产生错误,其出错原因是( )。A.定义语句出错,case是关键字,不能用做用户自定义标识符B.定义语句出错,printF不能用做用户自定义标识符C.定义语句无错,scanf不能作为输入函数使用D.定义语句无错,printf不能输出case的值

若有定义float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.swimh(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n");}B.switch((int)x); {case 1:printf("*\n"); case 2:printf("**\n");}C.switch(a+D. {case 1:pfintf("*\n"); case 2+1:pfintf("**\n");}switch(a-I-{case 1:pfintf("*\n"); case c:printf("**\n");}

有以下程序#includemain(){ int s;scanf(%d,s);while(s0){ switch(s){ case1:printf(%d,s+5);case2:printf(%d,s+4); break;case3:printf(%d,s+3);default:printf(%d,s+1);break;}scanf(%d,s);}}运行时,若输入1 2 3 4 5 0回车,则输出结果是A.6566456B.66656C.66666D.6666656

若有定义:float x=1.5;int a=1,b=3,c=2;则正确的switch语句是______。A.switch (x) {case 1.0: printf("*\n"); case 2.0: printf("**\n");}B.switch ( (int)x); {case 1: printf("*\n"); case2: printf("**\n");}C.switch (a+b) {case 1:printf("*\n"); case 2+1: printf("**\n");}D.switch (a+b)) {case 1: pfintf("*\n")}; case c: printf("**\n"));}

若有以下定义:float x;int a,b,c=2;,则正确的switch语句是( )A.switch(x) { case 1.0:printf("*\n"); case 2.0:printf("**\n"); }B.switch(int(x)) { case 1:printf("*\n"); case 2:printf("**\n"); }C.switch(a+b) { case 1:printf("*\n"); case 1+2:printf("**\n"); }D.switch(a+B){ case 1:printf("*\n"); case c:printf("**\n"); }

有以下程序:includemain(){char k; int i; for(i=1;i 有以下程序: #include <stdio.h> main() { char k; int i; for(i=1;i<3;i++) { scanf("%c",k); switch(k) { case '0': printf("another\n"); case '1': printf("number\n"); } { } 程序运行时,从键盘输入:01<回车>,程序执行后的输出结果是( )。A.another numberB.another number anotherC.another numberD.number number

若有定义:float x=1.5;int a=1,b=3,c=2; 则正确的switch语句是( )。A.switch(x) { case 1.0: printf("*\n"); case 2.0: printf(" * * \n" );B.switch((iht)x); { case 1: printf(" * \n" ); case 2: printf(" * * \n" ); }C.switch(a +b) { case 1: printf(" * \n" ); case 2 + 1: printf(" * * \n" ); }D.switch(a + b) { case 1: pfintf(" * \n" ); case c: pfintf(" * * \n"); }

阅读以下C代码,回答问题1至问题3,将解答填入答题纸的对应栏内。【C代码1】 float adjustSalary(int service_year,int age,float salary) { if( service_year 30 ) salary *= 1.2; } else salary *= 2.0; return salary;} 【C代码2】 void foo(int coin) { switch (coin) { case 1: printf("Cent\n"); case 5: printf("Nicke1\n");break; case 10: printf("Dime\n"); case 25: printf("Quarter\n"); }} 【C代码3】 int getSum(int n){ int t, i = 0, sum = 0; while ( i

单选题阅读以下程序:#include main(){ int case; float printF; printf("请输入2个数:"); scanf("%d %f",case,printF); printf("%d %f",case,printF);}该程序编译时产生错误,其出错原因是(  )。A定义语句出错,case是关键字,不能用作用户自定义标识符B定义语句出错,printF不能用作用户自定义标识符C定义语句无错,scanf不能作为输入函数使用D定义语句无错,printf不能输出case的值