考虑函数原型void test(int a,int b=7,char="*"),下面的函数调用中,属于不合法调用的是()
A.test(5)
B. test(5,8)
C. test(6,"#")
D. test(0,0,"*")
A.test(5)
B. test(5,8)
C. test(6,"#")
D. test(0,0,"*")
第1题
A.test(5)
B.test(5,8)
C.test(6,"#")
D.test(0,0,"")
第2题
A.int fun(int, int);
B.void fun(int x,y);
C.int fun(int x, int y);
D.void fun();
第3题
对于全局函数int f(void),与其完全等价的函数原型为const int f。()
第4题
A.f(5)
B. f(5,8)
C. f(6, , '#')
D. f(0,0, '#')
第5题
A.int x=3;fun(x);
B.const int y=3;fun(y);
C.fun(3);
D.以上三种都正确
第6题
A. fun(v1,&v2);
B.fun(v1,v2);
C.fun(&v1,v2);
D.fun(&v1,&v2);
第7题
A.test(5)
B.test(5,8)
C.test(6,’#’)
D.test(0,0,’*’)
第8题
Given the following code:
public class Test {
void printValue(int m) {
do { System.out.println("The value is"+m);
}
while(--m >10 )
}
public static void main(String arg[]) {
int i=10;
Test t= new Test ();
t.printValue(i) ;
}
}
Which will be output?
A.The value is 8 B.The value is 9
C.The value is 10 D.The value is 11
第9题
完成求n!的程序
public class Test{
public static void main(String args[]) {
factorial(3);
factorial(6);
factorial(9);
}
static (______) factorial(int n) {
long m=1;
for (int x=1;x<=n; (______) )
(______) ;
System.out.println (n+" ! ="+m) ;
}
}
第10题
A.t.f
B.this.n
C.Test.m
D.Test.n
第11题
A.A. int Function (int a) ;
B.B. void Function (char);
C.C. int Function(a﹡b);
D.D. void int (double﹡a) ;