更多“设s=’I︺AM︺A︺TEACHER’,其长度是()”相关问题
  • 第1题:

    I ________to go out of the classroom by my math teacher.

    A. make

    B. made

    C. was made

    D.am making


    参考答案:C

  • 第2题:

    设串s="I AM A STUDENT",则其串长是()。

    A.13

    B.14

    C.15

    D.16


    参考答案:B

  • 第3题:

    下列程序的执行结果是 public class Testff{ public static void main(String args[]){ String sl=new String("I am boy"); String s2=new String("I am boy"); System.out.println(sl==s2); } }

    A.真

    B.假

    C.I am boy

    D.都不正确


    正确答案:B
    解析:在Java语言中,“==”不仅可以用于基本数据类型之间的比较,还可以用于复合数据类型之间的比较。对于复合类型的“==”运算,其比较的目标是两个操作数是否是同一个对象,虽然题目中,a1和s2的值都是Iamboy,但是它们是不同的对象,比较后的结果应是false。如果需要比较两个对象的值是否相等,可以用equals()方法。

  • 第4题:

    有以下程序

    include<stdio.h>

    main()

    {char a[30],b[30];

    scanf(“%s”,a);

    gets(b);

    printf(“%s\n%s\n”,a,b);

    }

    程序运行时若输入:

    how are you? I am fine<回车>

    则输出结果是

    A.how are you? I am fine

    B.how are you? 1 am fine

    C.how are you? I am fine

    D.how are you?


    正确答案:B

  • 第5题:

    若输入 "I am a boy!",下列程序的运行结果为______。 char connect(string1,string2,string) char string1[],string2[],string[]; { int i,j; for (i=0;stringl[i] !='\0';i++) string[i]=stringl[i]; for (j=0;string2[j] !='\0';j++) string[i+j]=string2[j]; string[i+j ] ='\0'; } main ( ) { char s1 [100] , s2 [100] , s [100]; printf ("\n 输入 string1: \n"); scanf("%s",s1); printf (" \n 输入 string2: \n" ); scanf ("%s", s2); connect (s1, s2, s); printf ("%s\n", s); }

    A.I am a boy!

    B.输入string2:

    C.I am

    D.I am a boy!


    正确答案:C

  • 第6题:

    How are you going on with your English?()

    • A、I am very well. 
    • B、I am going to the library. 
    • C、I am going to take College English Test Band Four. 
    • D、That's a good question

    正确答案:C

  • 第7题:

    ()to have kept you waiting so long. Oh, never mind. After all, you are here.

    • A、I am happy 
    • B、It's a pleasure
    • C、I am sorry
    • D、I am welcome

    正确答案:C

  • 第8题:

    s=“I am a man”长度为()


    正确答案:10

  • 第9题:

    填空题
    s=“I am a man”长度为()

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

  • 第10题:

    填空题
    设S="I_am_a_teacther",其长度为()。

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

  • 第11题:

    单选题
    有以下程序: #include  main() {  char a[30],b[30];  scanf(%s,a);  gets(b);  printf(%s%s,a,b); } 程序运行时若输入: how are you?I am fine<回车> 则输出结果是(  )。
    A

    how are you? <换行>I am fine

    B

    how<换行> are you? I am fine

    C

    how are you? I am fine

    D

    how are you?


    正确答案: A
    解析:
    scanf语句接收字符串时遇到空格就认为字符串读入结束,但是gets函数遇到回车才认为结束。本题中将第一个空格前面的部分赋值给a,将后面的部分赋值给b。答案选择B选项。

  • 第12题:

    单选题
    As for a lesson  plan ,a teacher says,“When do lesson planning, I always prepare some extra and alternative tasks and activities so that I have the options to cope with the unexpected situations.” According to the teacher’s words, we can know that the teacher follows the principle of ______in lesson planning.
    A

    linkage

    B

    variety

    C

    flexibility

    D

    learnability


    正确答案: A
    解析:

  • 第13题:

    设串s="I am a teacher.’,则s的第8个字符起、长度为7的子串为()。

    A."teacher."

    B."teacher"

    C."a teacher"

    D."teacher"


    参考答案:B

  • 第14题:

    下列程序的执行结果是______。 public class Test9 { public static void main(String[] args) { String s1 = new String("I am a girl"); String s2 = new String("I am a girl"); System.out.println (s1.equal (s2)); } }

    A.true

    B.假

    C.I amgirl

    D.都不正确


    正确答案:A
    解析:如果需要比较两个对象的值是否相同,则可以调用equal()方法,如果被比较的两个对象相等,则返回true,否则返回false。

  • 第15题:

    有以下程序 #include<stdio.h> main( ) {char a[3O],b[30]; scanf("%S",a); gets(b); printf("%s\n%s\\n",a,b); } 程序运行时若输入: how are you? I am fine<回车> 则输出结果是( )。

    A.how are you? I am fine

    B.how are you?I am fine

    C.how are you?I am fine

    D.how are you?


    正确答案:B
    此题主要考查scanf函数和gets函数的区别。答案为B。

  • 第16题:

    下列程序的执行结果是 public class Testhh { public static void main(String args [] ) { Strings1=new String("I am boy"); Strings2=new String("I am boy"); System.out.println(s1.equals(s2)); } }

    A.真

    B.假

    C.I am boy

    D.都不正确


    正确答案:A
    解析:如果需要比较两个对象的值是否相同,则可以调用equals()方法,如果比较的两个对象的值相等则返回true,否则返回false。对于equals()方法和运算符“==”的区别没有掌握,运算符“==”是用来比较两者是不是同一个对象,是同一个对象则返回true,否则返回false。注意:equals()方法是Java的根类Object的方法,但是Java类库的许多子类,都重写了equals()方法。

  • 第17题:

    Do you know the girl over there?()

    A How can I know?

    BYes, I remember it now.

    CIt's Sam, my teacher's daughter

    DShe is a good girl.


    C

  • 第18题:

    Do you know the girl over there?()

    • A、 How can I know?
    • B、Yes, I remember it now.
    • C、It's Sam, my teacher's daughter
    • D、She is a good girl.

    正确答案:C

  • 第19题:

    设S="I_am_a_teacther",其长度为()。


    正确答案:15

  • 第20题:

    我是船舶物料供应商。()

    • A、I am the PSC inspector.
    • B、I am the ship’s chandler.
    • C、I am the ship’s agent.
    • D、I am the engineer of the shipyard.

    正确答案:B

  • 第21题:

    单选题
    I am a seaman, I come()the People’s Republic of China.
    A

    from

    B

    to

    C

    on

    D

    for


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

  • 第22题:

    填空题
    设s=’I︺AM︺A︺TEACHER’,其长度是()

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

  • 第23题:

    单选题
    As for a lesson plan,a teacher says,"When do lesson planning,I always prepare some extra and alternative tasks and activities so that I have the options to cope with the unexpected situations." According to the teacher's words, we can know that the teacher follows the principle of______ in lesson planning.
    A

    linkage

    B

    variety

    C

    flexibility

    D

    learnability


    正确答案: D
    解析: