更多"下列程序是将一个十进制正整数转化为一个八进制数,在程序的空白处应填入的"的相关试题:
[单项选择]下面程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是 public class FindKeyWords{ public static void main(String[]args) { String text="An array is a data structur that stores a collection of" +"values of the same type. You access each indMdual value" +"through an integer index. For example,if a is an array" +"of inergers,then a[i]is the ith integer in the array."; int arrayCount=0; int index=-1; String arrayStr="array"; index=text.indexOf(arrayStr); while(index>=0) { ++arrayCount; index+=arrayStr.length( ); index=text.indexOf(arrayStr,index); } System.out.println("the text contains"+arrayCount+"arrays"); } }
A. <
B. =
C. <=
D. >=
[单项选择]下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是( )。
public class FindKeyWords
public static void main(sring[]args)
sting text=
"An array is a data structur that stores a collection of"
+"values of the same type. You access each individual value"
+"through an integer index. For example,if a is an array"
+"of inergers,then a[i]is the ith integer in the array.";
Int arrayCount=0;
Int idex=-1;
Sting arrarStr="array";
Index=text.indexof(arravStr);
While(index______0)
++arrayCount;
Index+=arrayStr.length( );
Index=text.indexof(arrayStr,index);
System.out.println
("the text contains"+arrayCount+"arrays");
A. <
B. =
C. <=
D. >=
[单项选择]下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。
publicclassFindKeyWords
publicstaticvoidmain(sring[]args)
stingtext=
“Anarrayisadatastructurthatstoresacollectionof”
+“valuesofthesametype.YOUaccesseachindividualvalue’’
+“throughanintegerindex.Forexample,ifaiSanarray”
+“of inergers,thena[i]iSthe ith integer in thearray.”;
In tarrayCount=0;
Intidex=-1;
Sting arrarStr=“array”;
IndeX=text.indexof(arrayStr);
While(index______0)
++arrayCount;
Index+=arrayStr.length( );
IndeX=text.indexof(arrayStr,indeX);
SyStem.out.phntln
(“thetextcontains”+arrayCount+“arrays”);
A. <
B. =
C. <=
D. >=
[单项选择]
下列程序的功能是将一个整数数组写入二进制文件。在程序的下划线处应填入的选项是()
import java.io.*;
public class XieShuzu{
public static void main(String[] a){
int [] myArray={10,20,30,40};
try{
DataOutputStream dos=
new DataOutputStream(new FileOutputStream("ints.dat"));
for(int i=0;i
dos. _____(myArray[i]);
dos.close( );
System.out.println("已经将整数数组写入二进制文件:ints.dat");
}catch(IOException ioe)
{System.out.println("IO Exception");}
}
}
A. writeArray
B. writeByte
C. writeInt
D. writeDouble
[单项选择]下列程序的功能是将一个整数数组写入二进制文件,在程序的下划线处应填入的选项是()。
importjava.io.*;
publicclassXieShuzu
publicstaticvoidmain(String[]a)
int[]myArray=(10,20,30,40);
try
DataOutputStreamdos=
newDataOu中utStream(new
FileOutputStream("ints.dat"));
for(inti=O;i<myArray.length;i++)
dos.______(myArray[]);
dos.close( );
System.out.println("已经将整数数组写入二进制文件:ints.dat"):
catch(IOExceptionioe)
System.out.println("IOExcepr_on");
A. writeArray
B. writeByte
C. writeInt
D. writeDouble
[单项选择]采用DAO完成对“教学管理.accdb”文件中“学生表”的学生年龄都加1的操作,程序空白处应填写的语句是______。
Sub SetAgePlus( )
Dim ws As DAO.Workspace
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim fd As DAO.Field
Set db=CurrentDb( )
Set rs=db.OpenRecordset("学生表")
Setfd=rs.Fields("年龄")
Do While Not rs.EOF
______
fd=fd+1
rs.Update
rs.MoveNext
Loop
rs.Close
db.Close
Set rs=Nothing
Set db=Nothing
End Sub
A. rs.Fields.Edit
B. rs.Edit
C. Fields.Edit
D. Edit
[单项选择]采用DAO完成对“教学管理.mdb”文件中“学生表”的学生年龄都加1的操作,程序空白处应填写的语句是()。
Sub SetAgePlus( )
Dim WS As DAO.Workspace
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim fd As DAO.Field
Set db=CurrentDb( )
Set rs=db.OpenRecordset("学生表")
Set fd=rs.Fields("年龄")
Do While Not rs.EOF
______
fd=fd+1
rs.Update
rs.MoreNext
Loop
rs.Close
db.Close
Set rs=Nothing
Set db=Nothing
End Suh
A. rs.Fields.Edit
B. rs.Edit
C. Fields.Edit
D. Edit
[单项选择]采用ADO完成对“教学管理.mdb”文件中“学生表”的学生年龄都加1的操作,程序空白处应填写的是()。
SubSetAgePlus()
DimcnAsNewADODB.Connection
DimrsAsNewADODB.Recordset
DimfdAsADODB.Field
DimstrConnectAsString
DimstrSQLAsString
Setcn=CurrentProject.Connection
strSQL="Select年龄from学生表"
rs.OpenstrSQL,cn,adOpenDynamic,adLockOptimistic,adCmdText
Setfd=rs.Fields("年龄")
DoWhileNotrs.EOF
fd=fd+1
______
rs.MoveNext
Loop
rs.Close
cn.Close
Setrs=Nothing
Setcn=Nothing
EndSub
A. rs.Edit
B. rs.Update
C. Edit
D. Update
[单项选择]下列程序的功能是将一个整数数组写入二进制文件,在程序的下面线处应填入的选项是______。
importjava. io. * ;
public class XieShuzu
public static void main(String[] a)
int[]myArray=(10,20,30,40);
try
DataOutputStream dos=
new DataOutputStream(new
FileOutput Stream("ints. dat"))"
for(int i=0; i<myArray. length; i++)
dos. ______(myArray[i]);
dos. close( );
System. out. println("已经将整数数组写入二进制文件:ints. dat");
catch(IOException ioe)
System. out. println("IO Excepr_on");
A. writeArray
B. writeByte
C. writeInt
D. writeDouble
[填空题]将一个十进制整数转变成一个二进制整数。
#include<stdio.h>
main( )
{int i=0.j,n,num[20];
scanf("%d",______);/*第一空*/
while(n!=0)
{num[i++]=______;/*第二空*/
n=______;)/*第三空*/
for(j=i-1;j>=0;j--)
printf("Ha",num[j]);
printf("/n");
}
[填空题]下列程序的功能是用直接填入法将60H号类型中断服务程序INT 60H的入口地址填入中断向量表中,请填空:
MOV AX,0
MOV EX,AX
MOV BX,60H*4
【17】
MOV ES:WORD PTR [BX],AX
MOVAX,SEG INT 60H
MOV ES:WORD PTR [BX],AX
…
INT60H PROC
…
IRET
INT60H ENDP