为了使下面的程序段能用来把DL中的二进制代码从高位到低位依次转换为ASCII码并存入DI设定的内存数据区,该程
A.A.SHL DL,1
B.B.SHR DL,1
C.C.ROL DL,1
D.D.ROR DL,1
A.A.SHL DL,1
B.B.SHR DL,1
C.C.ROL DL,1
D.D.ROR DL,1
MOV CX, 8
NEXT:
MOV AL, DL
AND AL, 1
ADD AL, 30H
MOV [DI] ,AL
INC DI
LOOP NEXT
A.SHL DL,1 B.SHR DL,1 C.ROL DL,1 D.ROR DL,1
为了使AX和BX寄存器中的两个16位二进制数具有相同的符号位,下面的程序段中应填写______指令。
PUSH AX
______
______
TEST AX, 8000H
JZ SAME
XOR BX, 8000H
SAME: POP AX
A.AND AX,BX B.XOR AX,BX
C.SUB AX,BX D.OR AX,BX
执行下面的程序段,输出结果为【 】。 public class Q { public Static Void main(String args[]) { int anar[]=new int[5]; System.out.println(anar[0]); } }
执行下面的程序段,辅出结果为上【 】。 public class Q { public static void main (String argv[]) { int anar[]=new int[5]; System.out.pfintln(anar[0]); } }
下面的程序能求a: ab.c文件中最长行和它的位置。 include<stdio.h> main () { int lin,i,j=0,k=0; char c; FILE * fp; fp=(【 】 ("a:ab.c","r"); rewind (fp); while (fgetc (fp)! =EOF) i=1; 【 】 { i + + ; j + + ; if (i>=k) {k=i;【 】 ;} } printf("\n%d\t%d\n",k,lin); 【 】 ; }
在下面的代码段中填入一个适当的语句,表示从输入流中能读取对象(注:FileInputStream的形象为the Time)。 FileInputStream in=【 】; ObjectInputStream s=ObjectInputStream(in); String today=(String)s.readObject(); Date data=(Date)s.readObject();