表达式’apple.peach,banana,pear’.find(’ppp’)的值为()。

题目

表达式’apple.peach,banana,pear’.find(’ppp’)的值为()。


相似考题
更多“表达式’apple.peach,banana,pear’.fin”相关问题
  • 第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" ) ;


    正确答案:A

  • 第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;

    }


    正确答案:fin>>x
    fin>>x 解析:while语句用于完成题目指定的功能,则while的条件判断部分应完成从文件读取字符的功能,并能够判断出读入字符失败后的情况。

  • 第3题:

    从L=(),())中,取出banana元素的表达式为()。

    A、head(tail(L))

    B、head(head(tail(L)))

    C、tail(head(tail(L)))

    D、head(tail(head(tail(L))))


    参考答案:D

  • 第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( ) ;


    正确答案:C
    解析:C++语言中判断文件操作成功主要有两个函数good( ) 和fail( ) ,其中if(文件流名. good( ) ) 和if(!文件流名.fail( ) ),还有if(文件流名) 都可以表示判断文件操作是否成功。

  • 第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( );


    正确答案:C
    解析:C++语言中判断文件操作成功主要有两个函数good()和fail(),其中if文件流名. good())和if(!文件流名.fail()),还有if(文件流名)都可以表示判断文件操作是否成功。

  • 第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);  }  }  结果为:()  

    • A、2
    • B、3
    • C、5
    • D、编译失败

    正确答案:D

  • 第8题:

    Which parameters are valid SCREEN options for combating operating system probes?()

    • 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

    正确答案:C

  • 第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?() 

    • A、 restore 400
    • B、 restore 403
    • C、 restore 453
    • D、 Compilation fails.
    • E、 An exception is thrown at runtime.

    正确答案:C

  • 第10题:

    单选题
    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?()
    A

     restore 400

    B

     restore 403

    C

     restore 453

    D

     Compilation fails.

    E

     An exception is thrown at runtime.


    正确答案: E
    解析: 暂无解析

  • 第11题:

    填空题
    表达式’apple.peach,banana,pear’.find(’ppp’)的值为()。

    正确答案: -1
    解析: 暂无解析

  • 第12题:

    单选题
    Given that the elements of a PriorityQueue are ordered according to natural ordering,and: What is the result?()
    A

    apple pear

    B

    banana pear

    C

    apple apple

    D

    apple banana

    E

    banana banana


    正确答案: C
    解析: 暂无解析

  • 第13题:

    请将香蕉banana用工具 H( )—Head( ),T( )—Tail( )从L中取出。 L=(apple,(orange,(strawberry,(banana)),peach),pear)


    参考答案:H(H(T(H(T(H(T(L)))))))

  • 第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


    参考答案:C

  • 第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


    正确答案:C
    C。【解析】DragMode属性返回或设置一个值,确定在拖放操作过程中所使用的是手动还是自动拖动方式,当属性设置为1(自动方式)时,控件不能正常响应鼠标事件,在拖放操作过程中,当鼠标器指针在一个目标对象或窗体上时,单击鼠标会对目标对象产生DragDrop事件。而Source.Move是控件移动,Picture1.Left+X图片当前位置加鼠标X位置,Picture1.Top+Y图片当前高度位置加鼠标Y的位置即把图片移动到Picture1.Lefl+X,Picture1.Top+Y位置。

  • 第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");


    正确答案:D
    解析:C++语言中打开文件有两种方式①ifstreamfin("test.dar",)②ifstreamfin;fin.open("test.dat",);。

  • 第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”);


    正确答案:A
    解析:open是ifstream的成员函数,只能用对象fin去调用,不能用类调用。故选项A)错误。

  • 第18题:

    Which parameters are valid SCREEN options for combating operating system probes?()

    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


    参考答案:C

  • 第19题:

    import java.util.*;  public class PQ {  public static void main(String[] args) {  PriorityQueue pq = new PriorityQueue();  pq.add(”carrot”); pq.add(”apple”);  pq.add(”banana”);  System.out.println(pq.poll() +”:” + pq.peek()); }  }  What is the result?() 

    • A、 apple:apple
    • B、 carrot:apple
    • C、 apple:banana
    • D、 banana:apple
    • E、 carrot:carrot
    • F、 carrot:banana

    正确答案:C

  • 第20题:

    直放站在线性状态下最大输入电平时的放大能力。设主机额定增益为Gmax,输入功率为Fin,输出功率为Fout,则满增益输出为:()

    • A、Fout=Gmax
    • B、Fout=Fin-Gmax
    • C、Fout=Fin+Gmax
    • D、Fout=Fin

    正确答案:C

  • 第21题:

    下列关于FIN号说法错误的是()

    • A、FIN号的标签一般 贴在设备附近
    • B、FIN号的标签一般贴在设备上
    • C、每一个部件的Fin号是唯一的
    • D、同一件号的件,Fin号可能不同

    正确答案:B

  • 第22题:

    单选题
    要建立文件流并打开当前目录下的文件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”);


    正确答案: A
    解析:
    A项,在赋值号的左侧表示建立一个输入流对象fin,赋值号右侧的表达式不正确,文件输入流类ifstream不能直接调用其成员函数open。

  • 第23题:

    单选题
    Which parameters are valid SCREEN options for combating operating system probes?()
    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


    正确答案: D
    解析: 暂无解析