题目
The television station apologized for the interference, which was () bad weather conditions.
A、because
B、due to
C、in that
D、regardless of
第4题
下面是一个类的定义,试将程序补充完整。
class A{
String s;
____int a=66;
A(String sl){
s=sl;
}
static int geta(){
return a;
}
}
第5题
下面一组中都是C语言关键字的是_____。
A.double Int for
B.main while goto
C.volatile break static
D.malloc sizeof new
第6题
下面程序的输出结果是【 】。
include <iostream>
using namespace std;
int d=1;
fun(int p){
static int d = 5;
d+ =p;
cout<<d;
return (d) ;
}
void main () {
int a =3;
cout<<fun (a + fun (d) )<<endl;
}
第7题
A.ab
B.bc
C.abc
D.Compilation fails.
E.An exception is thrown at runtime.
第8题
以下叙述中正确的是
A.全局变量的作用域一定比局部变量的作用域范围大
B.静态(stati c) 类型变量的生存期贯穿于整个程序的运行期间
C.函数的形参都属于全局变量
D.未在定义语句中赋初值的auto变量和static变量的初值都是随机值
第9题
本题将数组中arr[]={5,6,3,7,9,1}的各个元素按下标的逆序输出。
public class javal{
public static void main(String[]args){
int arr[]={5,6,3,7,9,1};
;
n= ;
while(n>;=O){
System.OUt.print(arr[n]+"");
;
}
}
}
第10题
下列程序的输出结果为()。 #include<iostream.h) class TestClass { public: TestClass(){val++;} static,int val; }; int TestClass::val=0; void main() { TestClass cs1; cout<<csl.val<<““; TestClass cs2; TestClass cs3,cs4; co
A.03
B.13
C.14
D.24
第11题
请在下划线处填入代码,是程序正常运行并且输出 “ Hello! ”
Class Test 【 15 】 {
Public static void main (String[] arge){
Test t = new Test();
t.start();
}
Public void run(){
System.out.println(“ Hello! ” );
}
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!