-
仔细阅读下列程序,根据程序单,在坐标网格中画出刀具运行的轨迹和零件轮廓。https://assets.asklib.com/images/image2/2018072009050473777.jpg
-
阅读下列程序,说明程序执行后AX,BX,ZF,CF的值。 MOV AX,5678H MOV BX,1234H AND AX,BX INT 3 AX=(),BX=(),ZF=(),CF=()。
-
阅读下面一段教学实录(节选)回答问题。师:(赞叹的,语气上扬)这篇文章写得好不好啊?生:(异口同声)好!师:(试探的)最值得我们学习的是文章的形式还是……生:(齐声)内容!师:(满意地)好!接下来我们来学习这篇文章深刻而又富有哲理的内容!以下对这段教学片断评析错误的一项是()。
A . 问题设计低稚,不符合初中学生的年龄特点
B . 教师设置的第一个问题,属于判断式发问,学生无需思考,依靠教师语气即可判定答案
C . 教师设置的第二个问题,属于填空式发问,相比较而言具有较高的思维含量
D . 教学过程中的问题设置出发点应是教学目标,这两个问题,都忽略了教学目标
-
给定如下Java程序片断: class A{ public A (){ System.out.println("A"); } } class B extends A{ public B(){ System.out.println("B"); } public static void main(String[] args){ B b=new B(); } } 上述程序将()。
A . 不能通过编译
B . 通过编译,输出为:A B
C . 通过编译,输出为:B
D . 通过编译,输出为:A
-
阅读下列程序,说明程序执行后AX,BX,ZF,CF的值。MOV AX,FFFFHMOV BX,2896HXOR AX,BXINT 3AX=(),BX=(),ZF= (),CF= ()。
-
阅读下列程序片断: chars[]=”ABCD”,*p=s; cout<有关上述程序的输出结果,正确的判断是()。
A . p[3]引用格式有误,不能输出
B . 输出值不定
C . 输出C
D . 输出D
-
下面的哪些程序片断可能导致错误()
A . String s = "Gone with the wind"; String t = " good "; String k = s + t;
B . String s = "Gone with the wind"; String t; t = s[3] + "one";
C . String s = "Gone with the wind"; String standard = s.toUpperCase();
D . String s = "home directory"; String t = s - "directory"
-
阅读下列程序,则在执行后,程序的运行结果为( ).#include stdio.h#include string.hmain( ){ char a[30]=nice to meet you!
-
如果按下按键KEY1,LED0被点亮;松开按键KEY1,LED0熄灭的程序片断为if(KEY1==0)LED0=0;else LED0=1;
-
阅读下列程序,请写出该程序的功能。import java.awt.*; import java.awt.event.*; import java.applet.*;public class Test extends Applet implements ActionListener {String msg = \
-
给定某C程序片断,如下:int i = 1;int j = i++;if((i > ++j) && (i++ == j))i += j;printf(i);该程序运行后,i的输出结果是( )。
-
用户编写程序时不但要了解全局数据的分片情况,还要了解各片断的副本复制情况及各片断和它们的副本的场地位置的分配情况,这种分布透明性是______。
A.分片透明性
B.位置透明性
C.局部数据模型透明性
D.分布透明性
-
阅读下列FORTRAN程序:DO20K=2,5,2S=1.0DO10J=K,510S=S+J20CONTINUE*WRITE(*,*) SEND执行上述程序
阅读下列FORTRAN程序: DO 20 K=2,5,2 S=1.0 DO 10 J=K,5 10 S=S+J 20 CONTINUE* WRITE(*,*) S END 执行上述程序后,输出的S值为()。
A.9.0
B.1.0
C.24.0
D.10.0
-
现有如下程序片断:intx=6;if(x){System.out.println(“x=”+x);}else{System.out.println(“x=0”);}执行程序片断的结果是()。
A.x=6
B.x=0
C.编译出错
D.运行异常
-
有如下代码片断,将导致程序错误的行是()
A.line 1
B.line 2
C.line 5
D.line 8
-
阅读下列FORTRAN77程序:INTEGER A(4,4)DATA A/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/WRITE(*,
阅读下列FORTRAN77程序: INTEGER A(4,4) DATA A/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/ WRITE(*,100)F(A,3) 100 FORMAT(1X,F4.1) END FUNCTION F(B,N) INTEGER B(N,N) F=0.0 DO 10 K=1,N 10 F=F+B(K,K) END 上述程序运行后,输出结果为()。
A.19.0
B.9.0
C.8.0
D.18.0
-
阅读下列说明和C++程序,将应填入(n)处的字句写在对应栏内。【程序1说明】 程序1中定义了数组的类模
阅读下列说明和C++程序,将应填入(n)处的字句写在对应栏内。
【程序1说明】
程序1中定义了数组的类模板,该模板使得对于任意类型的二维数组,可以在访问数组元素的同时,对行下标和列下标进行越界判断,并给出相应的提示信息(C++语言本身不提供对下标越界的判断)。
【程序1】
include < iostream. h >
template < class T > class Array2D;
template < class T > class Array2DBody {
friend (1);
T * tempBody;
int iRows, iColumns, iCurrentRow;
Array2DBody(int Rows,int Cols) {
tempBody =(2);
iRows = Rows;
iColumns = Cols;
iCurrentRow = -1;
}
public:
T& operator[ ] (int j){
bool row_ error, column_ error;
row_ error = column_ error = false;
try {
if (iCurrentRow < 0||iCurrentRow > = iRows)
row_ error = true;
if(j < 0||j > = iColumns)
column_error = true;
if(row_error = = true [ [ column_ error = = true)
(3);
}
catch(char) {
if (row_error = = true)
cerr < < "行下标越界"[" < < iCurrentRow < < "]";
if(colmnn_error = = true)
cerr< <"列下标越界[" < <j< <"]";
cout < < "\n";
}
return tempBody[ iCurrentRow * iColumns + j ];
}
~ Array2 DBody () { delete [ ] tempBody; } }; template < class T > class Array2D {
Array2DBody < T > tBody;
public:
Array2DBody < T > & operalor[ ] (int i) {
tBody, iCurreutRow = i;
(4);
Array2D(int Rows,int Cols): (5) {} };
void main()
{
Array2D <int> al (10,20 );
Array2D <double> a2(3,5);
int bl;
double b2;
b1=a1[-5][10];//有越界提示:行下标越界[-5]
b1=a1[10][15];//有越界提示:行下标越界[10]
b1=a1[1][4];//没有越界提示
b2=a2[2][6];//有越界提示:列下标越界[6]
b2=a2[10][20];//有越界提示:行下标越界[10]列下标越界[20]
b2=a2[1][4];//没有越界提示
}
-
阅读下列程序段,不合法的行是______。class Computer{}class Monitor extends Computer{}class Ha阅读下列程序段,不合法的行是______。 class Computer{} class Monitor extends Computer{} class HardDrive extends Computer { public void test()
A; ④Monitor d = b; A.①②③
B.③④
C.①③④
D.②④
-
阅读下列程序说明和C++代码,将应填入(n)处的字句写在对应栏内。 [说明] ①定义私有数据成员code、en
阅读下列程序说明和C++代码,将应填入(n)处的字句写在对应栏内。
[说明]
①定义私有数据成员code、english分别用于表示考生的编号、英语成绩,它们都是int型的数据。
②完成成员函数void Student::inputinformation()的定义,该函数用于用户输入一个考生对象的信息,输入格式如下:
输入编号:
英语成绩:
计算机成绩:
③利用已实现的类Student的成员函数,完成函数void firstname(Student *A[],int uum)的定义,该函数根据考生信息A[],输出num个考生中总分最高者的编号及其相应的总分,在此不考虑总分相同的情况。
源程序文件test1.cpp清单如下:
include < iostream. h >
class Student
(1)
int computer;
int total;
public
void getinformation();
void computesum();
int getcode();
int gettotalscore();
~Student();
};
void Student: :getinformation()
{
(2)
cout <<"英语成绩:";
cin> >english;
cout <<"计算机成绩:";
cin > > computer;
void Student:: computesum ()
total = english + computer;
cout <<"编号" << code <<"总分:" <<total << endl;
int Student::getcode()
return code;
}
int Student:: gettotalscore ()
{
return total;
}
void firstname(Student * A[] ,int num)
{
(3)
tempsum = (* A[0] ). gettotalscore();
for(int i=1; i <num; i++)
{
if (((* A[i] ). gettotalscore() ) > tempsum)
{
tempcode = (* A[i] ). getcode();
tempsum = (* A[i] ). gettotalscore();
}
}
cout <<"总分最高者--" << tempcode <<":" << tempsum <<endl;
}
void main()
{
Student * A[3];
int i,n =3
for(i=0;i<n;i ++)
A[i] = new Student;
A[i] -> getinformation()
for(i=0;i<n;i ++)
{
A[i] -> computesum()
firstname (A,3 );
}
-
请阅读下列的程序publicclassExample01{publicstaticvoidmain(Stringargs){intnum=127;byteb=num;System、out、printIn(b);}}程序的运行结果是()。
A.编译通过,执行报错
B.编译报错
C.以上选项均不正确
D.编译通过,执行输出127
-
给定一个Java程序的代码片断如下:if(grade == 'A'grade == 'B') Score = 90;else if(grade == 'C'grade == 'D') Score = 70;else Score = 60;等同的switch是下列哪一个(选一项)()
A.switch(grade){ case 'A': case '
B.':score = 90; case '
C.': case '
D.':scpre = 70; default:score=60; }
-
阅读下列程序:程序运行后,单击命令按钮后的输出结果是()
A.234
B.345
C.567
D.356
-
阅读下列JSP代码片断:<%! private int m()
A.x=3,6
B.x=3,4
C.x=5,4
D.编译错误
-
阅读下列FORTRAN程序:MQIUH=N (5) +N (10)WRITE(*,’(2X, 15)’)MQIUHENDFUNCTION N (K)N=0DO 10 J=1,kN=N+J10 CONTINUERETURNEND程序运行后的结果是()
A.65
B.85
C.90
D.70