表达式’apple.peach,banana,pear’.find(’ppp’)的值为()。
第1题:
( 16 )要建立文件流并打开当前目录下的文件 file.dat 用于输入,下列语句中错误的是
A ) ifstream fin=ifstream.open ( "file.dat" ) ;
B ) ifstream*fir.=new ifstream ( "file.dat" ) ;
C ) ifstream fin; fin.open ( "file.dat" ) ;
D ) ifstream *fin=new ifstream ( ) ; fin 一 >open ( "file.dat" ) ;
第2题:
下列程序从保存整数的文本文件”c:Sample.dat”中依次取出每个数据并显示出来,同时统计并显示出所有数据的个数。程序划线处的表达式为______。
include<stream.h>
include<stdlib.h>
void main( )
{
ifstream fin("c:Sample.dat",los::nocreate);
if(! fin)
{
cout<<"文件无法打开!"<<endl;
exit(1);
}
int x,i=0;
while(______)
{
cout<<x<<"";
i++;
}
fin.close( );
cout<<endl<<"文件中所有整数个数:"<<i<<endl;
}
第3题:
从L=(),())中,取出banana元素的表达式为()。
A、head(tail(L))
B、head(head(tail(L)))
C、tail(head(tail(L)))
D、head(tail(head(tail(L))))
第4题:
对于下面的程序: ifstream fin(c:\test.txt) ; if(fin) cout < < "ok"; else cout < < "wrong"; if语句中的内容可以换为
A.fin. fail( ) ;
B.fin. bad( ) ;
C.fin. good( ) ;
D.fin. eof( ) ;
第5题:
对于下面的程序 ifstream fin(c:\test.txt); if(fin) cout<<"ok"; else cout<<"wrong"; 对于if语句中的内容可以换为
A.fin.fail( ):
B.fin.bad( );
C.fin.good( );
D.fin.eof( );
第6题:
PEAR 中的数据库连接字符串格式是()。
第7题:
import java.util.*; class Banana3 { public static void main(String [] args) { int x = 2; Banana3 b = new Banana3(); b.go(x); } static { x += x; } void go(int x) { ++x; System.out.println(x); } } 结果为:()
第8题:
Which parameters are valid SCREEN options for combating operating system probes?()
第9题:
Assuming that the serializeBanana() and the deserializeBanana() methods will correctly use Java serialization and given: import java.io.*; class Food implemertts Serializable {int good = 3;} class Fruit externds Food {int juice = 5;} public class Banana extends Fruit { int yellow = 4; public static void main(String [] args) { Banana b = new Banana(); Banana b2 = new Banana(); b.serializeBanana(b); // assume correct serialization b2 = b.deserializeBanana(); // assume correct System.out.println(”restore “+b2.yellow+ b2.juice+b2.good); } // more Banana methods go here } What is the result?()
第10题:
restore 400
restore 403
restore 453
Compilation fails.
An exception is thrown at runtime.
第11题:
第12题:
apple pear
banana pear
apple apple
apple banana
banana banana
第13题:
第14题:
importjava.util.*;publicclassPQ{publicstaticvoidmain(String[]args){PriorityQueuepq=newPriorityQueue();pq.add(”carrot”);pq.add(”apple”);pq.add(”banana”);System.out.println(pq.poll()+”:”+pq.peek());}}Whatistheresult?()
A.apple:apple
B.carrot:apple
C.apple:banana
D.banana:apple
E.carrot:carrot
F.carrot:banana
第15题:
在窗体E先后画2个图片框,名称分别为Picture1和banana,banana中添加了香蕉图片,如图1所示,且将banana.DragMode属性设置为1。要求程序运行时,可以用鼠标把banana拖拽到Picture1中,如图2所示。能实现此功能的事件过程是( )。
A.Private 3ub Form—DragDrop(Source As Control,X As Single,Y As Single) banana.Move Picture1.Left+X,Picture1.Top+Y End Sub
B.Private Sub banana_DragDrop(Source As Control,X As Single,Y As Single) Source.Move Picture1.Left+X,Picture 1.Top+Y End Sub
C.Private Sub Picturei_DragDrop(Source As Control,X As Single,Y As Single) Source.Move Picture1.Left+X,Picture1.Top+Y End Sub
D.Private Sub Picture1_DragDrop(Source As Control,X As Single,Y As Single) banana.Move banana.Left+X,banana.Top +Y End Sub
第16题:
下列语句不能够用于打开C根目录下文件test.txt的语句是
A.ifstream fin;fin.open("C:\\test.txt");
B.ifstream fin("C:\\test.txt");
C.A)和B)
D.ifstream fin;fin("C:\\test.txt");
第17题:
要建立文件流并打开当前目录下的文件file.dat用于输入,下列语句中错误的是
A.ifstream fin=ifstream.open(”file.dat”);
B.ifstream*fin=new ifstream(”file.dat”);
C.ifstream fin;fin.open(”file.dat”);
D.ifstream*fin=new ifstream();fin->open(”file.dat”);
第18题:
A. syn-fin, syn-flood, and tcp-no-frag
B. syn-fin, port-scan, and tcp-no-flag
C. syn-fin, fin-no-ack, and tcp-no-frag
D. syn-fin, syn-ack-ack-proxy, and tcp-no-frag
第19题:
import java.util.*; public class PQ { public static void main(String[] args) { PriorityQueue
第20题:
直放站在线性状态下最大输入电平时的放大能力。设主机额定增益为Gmax,输入功率为Fin,输出功率为Fout,则满增益输出为:()
第21题:
下列关于FIN号说法错误的是()
第22题:
ifstream fin=ifstream.open(“file.dat”);
ifstream* fin=new ifstream(“file.dat”);
ifstream fin; fin.open(“file.dat”);
ifstream* fin=new ifstream(); fin->open(“file.dat”);
第23题:
syn-fin, syn-flood, and tcp-no-frag
syn-fin, port-scan, and tcp-no-flag
syn-fin, fin-no-ack, and tcp-no-frag
syn-fin, syn-ack-ack-proxy, and tcp-no-frag