单项选择题
有一函数
,以下程序段中不能根据x值正确计算出y值的是( )。
A.if(x>0)y=1; else if(x= =0)y=0; else y=-1;
B.y=0; if(x>0)y=1; else if(x<0)y=-1;
C.y = 0; if (x> = 0) if (x>0) y = 1; else y = -1;
D.if ( x > = 0) if ( x>0)y = 1; else y = 0; else y = -1;
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
以下选项中不能正确把c1定义成结构体变量的是( )。
A.typedef struct { int red; int green; int blue; } COLOR; COLOR cl;
B.struct color cl { int red; int green; int blue; }
C.struct color { int red; int green; int blue; } cl;
D.struct { int red; int green; int blue; } cl;
点击查看答案
单项选择题
以下能正确定义一维数组的选项是
A.int num[ ];
B.#define N 100 int num[N];
C.int num[0..100];
D. int N=100; int num[N];
点击查看答案
相关试题
以下程序运行后的输出结果是【 】。int f...
以下函数sstrcat()的功能是实现字符串的...
有以下程序void f( int y,int *x)...
有以下程序:#include<stdio.h>main(...
有以下程序,其功能是:以二进制 写 方式...