单选题若x为float型变量则以下语句()。 x=223.82748; printf(""%6.2f/n"",x);A输出为223.8B输出为223.83C输出为223.82D不能输出

单选题
若x为float型变量则以下语句()。 x=223.82748; printf(""%6.2f/n"",x);
A

输出为223.8

B

输出为223.83

C

输出为223.82

D

不能输出


参考解析

解析: 暂无解析

相关考题:

若有以下定义和语句union data{ int i; char c; float f; } x;int y;则以下语句正确的是A)x=10.5;B)x.c=101;C)y=x;D)printf("%d\n",x);

设有定义: float x=123.4567; ,则执行以下语句后的输出结果是 【 6 】 。printf("%f\n",(int)(x*100+0.5)/100.0);

若有定义 : 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");}

若有定义: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");}

若有下列定义(设int类型变量占2个字节): float x=123.4567; 则下列语句: printf("x=%5.2f",x); 输出的结果是( )。A.x=123.46B.123.4567C.x=123.4567D.123.46

设变量均已正确定义并且赋值,以下与其他三组输出结构不同的一组语句是()A.x++;printf((“%d\n”,x);B.n=++x;printf((“%d\n”,n);C.++x;printf((“%d\n”,x);D.n=x++;printf((“%d\n”,n);

设有定义:longx=-123456L;,则以下能够正确输出变量x值的语句是A.printf("x=%d\n",x);B.printf("x=%1d\n",x);C.printf("x=%8dL\n",x);D.printf("x=%LD\n",x);

若有以下定义,则正确的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"); }

设有定义:float x=123.4567;,则执行以下语句后的输出结果是[ ]。printf("%f\n"(int)(x*100+0.5)/100.1;

若x为int型变量,则执行以下语句后,x的值为 ( ) x=6; x+=x-=x*x;A.36B.-60C.60D.-24

设有定义:long x=123456L;,则以下能够正确输出变量x值的语句是( )A.printf("x=%d\n",x);B.printf("x=%ld\n",x);C.printf("x=%8dL\n",x);D.printf("x=%LD\n",x);

设变量均已正确定义并赋值,以下与其他三组输出结果不同的一组语句是( )。A.x++;printf("%dkn",x);B.n=++x;printf("%d\n",n);C.++x;printf("%d\n",x);D.n=x++;printf("%6d\n",n);

设变量均已正确定义并赋值,以下与其他三组输出结果不同的一组语句是A)x++;printf(”%d\n”,x);B)n=++x;printf(”%d\n”,n);C)++x;printf(”%d\n”,x);D)n=x==;printf(”%d\n”,n);

设有定义:long x=-123456L;,则以下能够正确输出变量x值的语句是A.printf(“x=%d\n”,x);B.printf(“x=%1d\n”,x);C.printf(“x=%8dL\n”,x);D.pfintf(“x=%LD\n”,x);

设有定义:long x=-123456L; 则以下能够正确输出变量x值的语句是_______。A.printf(“x=%d\n”,x)B.printf(“x=%ld\n”,x)C.printf(“x=?l\n”,x)D.printf(“x=%D\n”,x);

设有定义:“long x=123450L;”,则以下能够正确输出变量x的是( )。A.printf("x=%d\n",x);B.printf("x=%id\a",x);C.printf("x=%dL\n”,x);D.printf("x=%ld\n",x);

设x,y均为int型变量,且x=10,y=3,则printf("%d\n"x-,-y);语句的输出结果是 ______。A.10,3B.9,3C.9,2D.10,2}

请补充main函数,该函数的功能是求方程ax2+bx+c=0的根(方程的系数a,b,c从键盘输入)。例如, 当a=1,b=2,c=1时, 方程的两个根分别是:x1=-1.00,x2=-1.00。注意:部分源程序给出如下。请勿改动主函数main和其他函数中的任何内容,仅在 main函数的横线上填入所编写的若干表达式或语句。试题程序:include <stdio.h>include <conio.h>include <math.h>main(){float a,b,c,disc,x1,x2,p,q;scanf("%f,%f,%f",a,b,c);disc=b*b-4*a*c;clrscr();printf("****** the result ****+*+\n");if(disc>=0){x1=【 】;x2=(-b-sqrt(disc))/(2*a);printf("x1=%6.2f,x2=%6.2f\n",x1,x2);}else{p=【 】;q=【 】;printf("x1=%6.2f+%6.2f i\n",p,q);printf("x2=%6.2f-%6.2f i\n",p,q);}}

若a是float型变量,b是unsigned型变量,以下输入语句合法的是 ( )A.scanf("%6.2f%d", a,b);B.scanf("%f%n",a,b);C.scanf("%f%30",a,b);D.scanf ("%f%d",a,b);

若有定义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");}

若有定义: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"));}

设有定义:long x= -123456L;,则以下能够正确输出变量x值的语句是A.printf("x=%d\n",x);B.printf("x=%1d\n",x);C.printf("x=%8dL\n",x);D.printf("x=%LD\n",x);

若有定义: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"); }

设有定义:10ng x=-123456L,则以下能够正确输出变量x值的语句是( )。A.printf("x=%d\n",x);B.printf("x=%1d\n",x);C.peintf("x=%8dL\n",x);D.printf('x=%LD\n",x);

若x为float型变量则以下语句()。 x=223.82748; printf(""%6.2f/n"",x);A、输出为223.8B、输出为223.83C、输出为223.82D、不能输出

若k,g均为int型变量,则下列语句的输出为() k=017; g=111; printf("%d/t",++k); printf("%x/n",g++);A、15    6fB、16    70C、15    71D、16    6f

单选题若x为float型变量则以下语句()。 x=223.82748; printf(""%6.2f/n"",x);A输出为223.8B输出为223.83C输出为223.82D不能输出