已知函数f的原型是“voidf(int*x,int&y);”,变量v1、v2的定义是“intv1,v2;”,下列调用语句中,正确的
已知函数f的原型是“voidf(int*x,int&y);”,变量v1、v2的定义是“intv1,v2;”,下列调用语句中,正确的是()。
A.f(v1,v2)
B.t(v1,&v2)
C.f(&v1,v2)
D.f(&v1,&v2);
已知函数f的原型是“voidf(int*x,int&y);”,变量v1、v2的定义是“intv1,v2;”,下列调用语句中,正确的是()。
A.f(v1,v2)
B.t(v1,&v2)
C.f(&v1,v2)
D.f(&v1,&v2);
第1题
A.3
B.6
C.4
第2题
Avoidfun(intaD);
Bvoidfun(int*&A;
Cvoidfun(int&a[);
Dvoidfun(int&*A;
第3题
A.voidfun(int(*p)[3]);
B.voidfun(int**p);
C.intfun(int(*p)[3]);
D.intfun(int*p[]);
第4题
A.void f(int&) const;
B.const A * f(const int );
C.A& f(int, int=50);
D.A f(const int&) const;
第5题
A.doublefun1(inta,intb,intc)
B.doublefun2(floata,intb,doublec)
C.intfun3(inta,floatb,doublec)
D.doublefun4(int,float,double)
第6题
A、若只在主函数中对函数f进行说明,则只能在主函数中调用函数f
B、若在主函数前对函数f进行说明,则在主函数和其后的其它函数中都可以调用函数f
C、对于以上程序,编译时系统会提示出错信息:提示对对f函数重复说明
D、函数f无返回值,所以可用void将其类型定义为无值型
第7题
A.void f1(int x);
B.void f2(int*x);
C.void f3(const int*x);
D.void f4(int&x);
第8题
A.*ff(int[],int)
B.int(*ff)(int*a,int)
C.void(*ff)(int*a,int)
D.void*ff(int*a,int)
第9题
A.函数prt_char(int x)定义的位置不对,不能放在主函数main()的后面。
B.函数名不能使用下划线
C.函数原型和函数定义不匹配
D.变量名不能使用大写字母
第10题
寻找最大数 题目内容: 主函数定义一个长度为5的整型一维数组,编写一个函数实现求此一维数组的最大值。函数 原型:int max(int a[], int n); 功能是返回长度为n的数组a中最大的一个数。 输入格式: 5个整数 输出格式: "The result is %d\n" 输入样例1: 12 6 18 9 4↙ 输出样例1: The_result_is_18 输入样例2: 9 7 -2 3 4↙ 输出样例2: The_result_is_9
第11题
编写strcat函数(6分) 已知strcat函数的原型是char *strcat (char *strDest, const char *strSrc); 其中strDest 是目的字符串,strSrc 是源字符串。 (1)不调用C++/C 的字符串库函数,请编写函数 strcat