在VFP中,MAX(ROUND(3.14,1),INT(3.9))的值是()
第1题:
以下函数 findmax 拟实现在数组中查找最大值并作为函数值返回 , 但程序中有错导致不能实现预定功能
#define MIN -2147483647
int findmax (int x[],int n)
{ int i,max;
for(i=0;i<n;i++)
{ max=MIN;
if(max<x[i]) max=x[i];}
return max;
}
造成错误的原因是
A) 定义语句 int i,max; 中 max 未赋初值
B) 赋值语句 max=MIN; 中,不应给 max 赋 MIN 值
C) 语句 if(max<x[i]) max=x[i]; 中判断条件设置错误
D) 赋值语句 max=MIN; 放错了位置
第2题:
在Visual Basic中,下列( )表达式的值不等于4。
A.Int( 4.1)
B.Int( 4.9)
C.Abs(Int(- 3.9))
D.Abs(Int(- 4.5))
第3题:
比较MAX(2,4,6,8,10)、ROUND(8.5,0)、INT(8.5)、ABS(-11)的大小,正确顺序为( )。
A.ABS(-11)<ROUND(8.5,0)<INT(8.5)<MAX(2,4,6,8,10)
B.ABS(-11)<INT(8.5)<ROUND(8.5,0)<<MAX(2,4,6,8,10)
C.INT(8.5)<ROUND(8.5,0)<MAX(2,4,6,8,10)<ABS(-11)
D.ROUND(8.5,0)<INT(8.5)<MAX(2,4,6,8,10)<ABS(-11)
第4题:
下列函数定义中,会出现编译错误的是
A.max(int x,int y,int *z) { *z=x>y ? x:y; }
B.int max(int x,y) { int z; z=x>y ? x:y; return z; }
C.max(int x,int y) { int z; z=x>y?x:y; return(z); }
D.int max(int x,int y) { return(x>y?x:y); }
第5题:
A.Intfoo=(int)Math.max(bar);
B.Intfoo=(int)Math.min(bar);
C.Intfoo=(int)Math.abs(bar);
D.Intfoo=(int)Math.ceil(bar);
E.Intfoo=(int)Math.floor(bar);
F.Intfoo=(int)Math.round(bar);
第6题:
在VFP中,MIN(ROUND(8.89,1),9)的值是【 】。
第7题:
下列函数定义中,会出现编译错误的是 ______。
A.max(int x,int y,int *z) { *z=x>y? x:y;}
B.int max(int x,y) {int z; z=x>y? x;y; return z; }
C.max(int x,int y) { int z; z=x>y? x:y; return(z); }
D.int max(int x,int y) { return(x>y?x:y);}
第8题:
请将以下程序中的函数声明语句补充完整
#include <stdio.h>
int【12】 ;
main( )
{int x,y,(*p)();
p=max;
printf(“&d\n”,&x,&y);
}
Int max(int a,int b)
{return (a>b/a:b);}
(12)max(int a,int b)
第9题:
A.Intfoo=(int)Math.max(bar);
B.Intfoo=(int)Math.min(bar);
C.Intfoo=(int)Math.abs(bar);
D.Intfoo=(int)Math.ceil(bar);
E.Intfoo=(int)Math.floor(bar);
F.Intfoo=(int)Math.round(bar);
第10题:
以下函数findmax拟实现在数组中查找最大值并作为函数值返回,但程序中有错导致不能实现预定功能。
#d越lie MIN-2147483647
int findmax(int X[],int n)
{ int i,max;
for(i=0;i<n;i++)
{max=MIN;
if(max<x[i])max=x[i];}
return max;
}
造成错误的原因是
A.定义语句int i,max;中max未赋初值
B.赋值语句max=MIN;中,不应给max赋MIN值
C.语句if(max<x[i])max=X[i];中判断条件设置错误
D.赋值语句max=MIN;放错了位置