【单选题】如有以下代码段:struct POINT{ public double x;//横坐标 public double y;//纵坐标}POINT[] p=new POINT[100];则对结构体数组p的操作正确的代码段是()。
A.
p[0].x=1.0; p[0].y=2.0;
B.
p[100].x=1.0; p[100].y=2.0;
D.
p.x[0]=1.0; p.y[0]=2.0;
【简答题】What does the restoration of the Classic Coke best illustrate? A) Traditional goods have a stronger appeal to the majority of people. B) It takes time for a new product to be accepted by the public. C...
【单选题】分析以下代码: double sum = 0; for (double d = 0; d < 10; sum +=sum + d) { d +=0.1; }
A.
该程序有语法错误,因为for循环中的调整变量语句不正确。
B.
该程序存在语法错误,因为for循环中的控制变量不能为double类型。
【简答题】给定程序中,函数fun的功能是:用函数指针指向要调用的函数,并进行调用。当调用正确时,程序输出:x1=5.000000,x2=3.000000,x1*x1+x1*x2=40.000000。请选择在下画线处填入正确的语句,使程序得出正确的结果。#include double f1(double x){ return x*x; }double f2(double x, double y){ ...
【单选题】What does the restoration of the Classic Coke best illustrate?
A.
Traditional goods have a stronger appeal to the majority of people.
B.
Products must be designed to suit the taste of the consumer.
C.
Consumers with conservative tastes are often difficult to please.
D.
It takes time for a new product to be accepted by the public.
【简答题】看以下代码: double x1=100.3; double x2=1003/10; System.out.println(x1==x2); 输出的结果为false,为什么?
【单选题】有如下两个类定义: class XX{ private: double X1; protected: double x2; public: doublex3; ); clase YY:protected XX{ private: doubley1; protected: doubley2; public: double y3; }; 在类YY中保护成员变量的个数是( )。
【单选题】分析以下代码: double[] array = {1, 2, 3}; ArrayList list = new ArrayList(Arrays.asList(array)); System.out.println(list);
B.
代码正确,并显示[1.0,2.0,3.0]。
C.
该代码具有编译错误,因为诸如1之类的整数会自动转换为Integer对象,但是数组元素类型为Double。
D.
该代码有一个编译错误,因为asList(array)要求数组元素是对象
【简答题】Queen are a British rock band that formed in London in 1970. What is the classic line-up of the band Queen?