niusouti.com

单选题$str = "My name is Jack, and what is your name?";echo substr_count ($str,“name”);程序的输出结果为()。A 1B 2C 3D 4

题目
单选题
$str = "My name is Jack, and what is your name?";echo substr_count ($str,“name”);程序的输出结果为()。
A

1

B

2

C

3

D

4


相似考题
更多“$str = "My name is Jack, and what is your name?";echo substr”相关问题
  • 第1题:

    “请您在这签字好吗”用英语表述最恰当的是( )。

    A.Sign your name here.

    B.Put your name here.

    C.Would you please sign your name here

    D.Would you please write your name here


    正确答案:C

  • 第2题:

    A:( ).

    B:Hi. My name's Rose. Are you from London?

    A. Hello, I'm Paul. What's your name?

    B. Hello, who are you? What's your name?

    C. Where are you from?


    正确答案:A

  • 第3题:

    下面哪些句子可以表示"您贵姓?"()

    A、What's your last name?

    B、What's your family name?

    C、What's your name?

    D、What's your first name?


    参考答案:AB

  • 第4题:

    Personal Information

    1. What is your name? Your name, please? Please give me your name. May I have your name?


    正确答案:
         

  • 第5题:

    Please delete my name from your list.

    A:change
    B:edit
    C:omit
    D:copy

    答案:C
    解析:
    本句意思是:请从你的名单上把我的名字删去。句中delete意为“删除”,例如:He deleted files from the computer system.他从计算机系统里删除了文件。四个选项中:change意为“改变”。edit意为“编辑”,例如:This collection of essays is edited by Ellen Knight.这本文集是由埃伦·奈特编选的。omit意为“省略,删除”,例如:Omit the salt in this recipe.省略菜谱中放盐这一步。copy意为“仿造、复制”,例如:The designer's work has been widely copied.那个设计师的作品被广泛模仿。只有选项C同句中画线单词含义接近。

  • 第6题:

    A:What’s your( )(名字),please?B:My name is Li Dawei.


    正确答案:name

  • 第7题:

    The command echo $! will produce what output?()

    • A、 the process id of last background command
    • B、 the exit status of the last command
    • C、 the exit status of the last background command
    • D、 the process id of the current shell
    • E、 the name of the command being executed

    正确答案:A

  • 第8题:

    填空题
    A:What’s your( )(名字),please?B:My name is Li Dawei.

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

  • 第9题:

    单选题
    如果要把一个用户名jack保存在session对象里,则下列语句正确的是()。
    A

     session.setAttribute( name, jack );

    B

     session.setAttribute(“ name” , “jack”);

    C

     session.setAttribute( “jack”, “ name” );

    D

     session.setAttribute(“jack”, name );


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

  • 第10题:

    单选题
    You discover that your Recycle Bin contains two tables with the same name, MY_TABLE. You also have a table named MY_TABLE in your schema. You execute the following statement:   FLASHBACK TABLE my_table TO BEFORE DROP RENAME TO my_table2;   What will be the result of executing this statement?()
    A

     One of the tables is recovered from the Recycle Bin using a First In First Out (FIFO) approach.

    B

     One of the tables is recovered from the Recycle Bin using a Last In First Out (LIFO) approach.

    C

     Both the tables are recovered from the Recycle Bin with one table renamed to MY_TABLE2 and the other to a system-generated name.

    D

     None of the tables are recovered from the Recycle Bin, and the statement returns an error.


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

  • 第11题:

    单选题
    有以下程序:#include #include main(){ char name[9]=c##line; char *str=name;  printf(%d,%d,%d,%d, sizeof(name), strlen(name), sizeof(str), strlen(str)); }程序运行后的输出结果是(  )。
    A

    9,7,4,7

    B

    8,6,9,6

    C

    8,6,3,6

    D

    10,8,5,8


    正确答案: D
    解析:
    由于name是一个长度为9的一维数组,故在内存中占用9字节长度,而其中字符串"c##line"只有7个字符,strlen函数返回的是该字符串的长度,不包含结束符,str是一个指针变量,占用4字节长度,但是由于name首地址赋给了str指针变量,在调用strlen函数时,返回的是指针对应地址单元的字符串的长度7,答案选择A选项。

  • 第12题:

    问答题
    Directions: Talk on the following topic for 5 minutes. Be sure to make your points clear and supporting details adequate. You should also be ready to answer any questions raised by the examiners during your talk. You need to have your name and registration number recorded. Start your talk with “My name is...,” “My registration number is...”  ◆Topic 1: The Retirement Age for Chinese  Questions for reference:  1. Do you agree that the mandatory retirement age for Chinese should be extended? Give your reasons.  2. Some people are opposed to the extension initiative for fear that it might reduce job opportunities for young people. What’s your comment on this opinion?  3. China is facing a surplus labor force. What are the possible solutions to such a problem?

    正确答案: 【参考答案】
    My name is...My registration number is...My topic is...The Retirement Age for Chinese.
    It has been said that the government is discussing about extending the retirement age of employees. Although the authorities involved have ruled out the possibility of increasing the retirement age for the time being, it has still caused much concern and heated discussion.
    Back in the 1980s, China’s major concern was its huge population, which had to be tackled first. But today, the aging of its population has become a pressing issue. As life expectancy increases with the help of higher social living and healthcare standards, more and more retired people are becoming healthier and still energetic enough to continue their work. For example, a 50-year-old man used to be regarded as aged a few decades ago, while he would more probably be considered a middle-aged person today. On the other hand, people in China retire earlier than in many other countries. In many of the western countries, the retirement age today is usually 65, or even beyond 65. But in China, the average men retire at the age of 60, and women at 55. Moreover, many workers retire earlier than the legal retirement age owning to preferential policies for women and workers in some of the heavy industries. The other thing which is worth our consideration is that the life expectancy of Chinese has been raised for a number of times over the past decades, and in many of the big cities in China, it has already reached 80 or over, so our pension scheme is facing an increasingly heavy pressure. Taking into consideration of the above-mentioned situation and some other factors, many people think that the retirement age for Chinese workers should and can be extended.
    However, adjusting the social security system is a big issue, which has to be done with caution and discretion. The government should encourage a thorough public discussion on the issue and strike the right balance between the pros and cons before making the decision.
    解析: 暂无解析

  • 第13题:

    有以下程序:includeincludeusingnameSpacestd;classperson{ intage; Char*nam

    有以下程序:

    include <iostream>

    include <string>

    using nameSpace std;

    class person

    {

    int age;

    Char * name;

    public:

    person ( int i, Char * str )

    {

    int j;

    j = strlen( str ) + 1;

    name = new char[ j ];

    strcpy( name, str );

    age = i;

    }

    ~person()

    {

    delete name;

    cout<<"D";

    }

    void display()

    {

    cout<<name<<":"<<age;

    }

    };

    int main()

    {

    person demo( 30,"Smith" );

    demo.display();

    return 0;

    }

    则该程序的输出结果为:【 】。


    正确答案:Smith:30 D
    Smith:30 D 解析:本题考核类与对象的操作。主函数中定义类person的对象 demo,并赋初值(30,"smith")。然后调用成员函数display()输出赋值结果,即Smitch:30。程序结束时demo对象的析构函数被调用,再输出“D”。

  • 第14题:

    YouacceptedtherecommendedSQLProfilebyexecutingthefollowingcode:DECLAREsqlprofile_namevarchar2(30);BEGINsqlprofile_name:=DBMS_SQLTUNE.ACCEPT_SQL_PROFILE(task_name=>’my_task’,profile_name=>’my_profile’);END;Whichadvisorwillanalyzethisprofile?()

    A.SQLAccessAdvisor

    B.UndoAdvisor

    C.SegmentAdvisor

    D.SQLTuningAdvisor


    参考答案:D

  • 第15题:

    若有以下说明,则能打印出“Yu”的语句是______。 struct samp { char name[10]; int number; }kk[3]={{"WarBin",1},{"LiYu",2},{"LuHui",3}}; struct samp*str[3]; str[0]=&kk[0];str[1]=&kk[1];str[2]=&kk[2];

    A.printf("%s\n",str[1].name[2]);

    B.printf("%s\n",str[1]->name+2);

    C.printf("%s\n",str[2].name[2]);

    D.printf("%s\n",str[2]->name+2);


    正确答案:B
    解析:str是指针数组,每个元素存放的是指向结构体类型数据的地址,每个元素可看作是一个指针变量,通过结构体指针变量引用结构体变量各成员的形式有两种:一是(*指针变量名).成员名;二是指针变量名->成员名。本题可以是"(*str[1]).name+2"或"str[1]->name+2"。

  • 第16题:

    下列程序通过实现Runnable接口创建一个线程,选择正确的语句填入程序的横线处。 class MyRun implements Runnable { String str; MyRun(String s) { str = s; } public void run() System.out.println(str); } } public class ex40 { public static void main(String[] args) { String name = "实现阶段Runnable 接口"; MyRun my = new MyRun(name); Thread th = th. start ( ); } }

    A.new MyRun(my)

    B.new Thread()

    C.new Thread(my)

    D.Thread(my)


    正确答案:C

  • 第17题:

    如果要把一个用户名jack保存在session对象里,则下列语句正确的是()。

    • A、 session.setAttribute( name, jack );
    • B、 session.setAttribute(“ name” , “jack”);
    • C、 session.setAttribute( “jack”, “ name” );
    • D、 session.setAttribute(“jack”, name );

    正确答案:B

  • 第18题:

    May I know your name,please?()

    • A、Thank you
    • B、My name is LinWei.
    • C、Yes,Iam.
    • D、Good morning.

    正确答案:B

  • 第19题:

    $str = "My name is Jack, and what is your name?";echo substr_count ($str,“name”);程序的输出结果为()。

    • A、1
    • B、2
    • C、3
    • D、4

    正确答案:B

  • 第20题:

    单选题
    以下涉及字符串数组、字符指针的程序段,不会产生编译错误的是(  )。
    A

    char*str,name[10]; str=Hello World;

    B

    char*str,name[10]; name=Hello World;

    C

    char str1[10]=prog.c, str2[10]; str2=str1;

    D

    char head_line[]; head_line=== == == == == == =;


    正确答案: B
    解析:
    将字符指针变量初始化为一个字符串有两种方式,一种通过赋值运算使一个字符指针指向一个字符串常量:char*str; str="Hello World",A选项正确。另一种是定义一个字符指针变量,并且初始化为一个字符串的首地址:char*str="Hello World"。字符指针变量与字符数组都可以用来实现字符串的存储和运算,但二者是有区别的:①数组名是一个地址常量,而字符指针变量是一个变量,所以不能给一个数组名赋值,如name = "Hello world"错误,B选项错误;②字符型的指针变量的值是可以改变的;③字符指针变量和字符数组在内存中的存储情形不同,数组指的是按照数组长度分配的若干存储空间,而指针只是一个存储字符串首地址的存储空间,所以相同类型指针可以相互赋值,而数组不能直接用“=”赋值,C选项错误。不能给数组名赋值.Head_line="== == == == == ="不合法,只有在数组初始化时可以直接赋值,如char head_line[]="==== == == == == ="合法,并且定义数组时必须指定数组长度,char head_line[]不合法,故D选项错误。答案选择A选项。

  • 第21题:

    单选题
    以下选项中,合法的是(  )。
    A

    char str3[]={'d', 'e', 'b', 'u', 'g', '\0'}

    B

    char str4; str4=hello world;

    C

    char name[10]; name=china;

    D

    char str1[5]=pass, str2[6]; str2=str1;


    正确答案: D
    解析:
    A项是在赋初值时直接赋字符串常量。B项,str4是一个字符型变量,不能直接赋值字符串;C项,数组名name是一个地址常量,不能直接被赋值;D项,str1和str2代表两个大小不同的字符数组的首地址,不能互相赋值。答案选择A选项。

  • 第22题:

    单选题
    You discover that your Recycle Bin contains two tables with the same name, MY_TABLE. You also have a table named MY_TABLE in your schema.You execute the following statement: FLASHBACK TABLE my_table TO BEFORE DROP RENAME TO my_table2; What will be the result of executing this statement?()
    A

    One of the tables is recovered from the Recycle Bin using a First In First Out (FIFO) approach.

    B

    One of the tables is recovered from the Recycle Bin using a Last In First Out (LIFO) approach.

    C

    Both the tables are recovered from the Recycle Bin with one table renamed to MY_TABLE2 and the other to a system-generated name.

    D

    None of the tables are recovered from the Recycle Bin, and the statement returns an error.


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

  • 第23题:

    问答题
    Directions: Talk in English on the following topic for at least 3 minutes. Be sure to make your point clear and supporting details adequate. You should also be ready to answer any questions raised by the examiners during your talk. You need to have your name and registration number recorded. Start your talk with “My name is...”, “My registration number is...”  ◆Topic 1:How to Keep Healthy Psychologically?  Questions for Reference  1) How serious is the problem of psychological health since it will lead to physical illness and ill effect on life?  2) What are the causes of psychological problem?  3) What are the recommendations you can offer?

    正确答案: 【参考答案】
    My name is... My registration number is... My topic is: How to Keep Healthy Psychologically?
    Nowadays, more and more people are living under pressure, no matter what the age and sex. One in four people will experience some kind of mental health problem in the course of a year. When you fail to manage these problems, they are likely to cause various mental illnesses and, as a result of physiological imbalance, physical illnesses. You may not be able to live a normal life, let alone a fulfilling one. So many mental problems have been widely realized. And recent research has shown that the psychological problem is one of the main causes that lead to diseases.
    The causes of mental health problems often vary a lot from one case to another. In today’s society, a good number of people are suffering from heavy pressure. Others lack communication skills and feel they are living in an isolated world. In addition, a lot of people are ignorant of psychological knowledge about how to keep mentally fit.
    There are a lot of ways to curb mental health problems and keep psychologically healthy. Firstly, find the real cause of your mental health problem and see whether you can do something to make a change. Secondly, learn to relax yourself and take exercise to release the pressure. After all, your health condition is what counts most. Finally, you may find it helpful to talk to your partner or friend about your problem, or seek support and advice from a psychological consultant.
    解析: 暂无解析