$str = "My name is Jack, and what is your name?";echo substr

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

1

B

2

C

3

D

4

参考答案和解析
正确答案: B
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

When ________, John did not reply.

(A) he asking what his name was

(B) was asked what his name was

(C) asking what John’s name was

(D) asked what his name was


正确答案:D
解答参考:D.分词的独立结构。我们可以用诸如when,after等连接词+分词在句中做状语,但该状语的逻辑主语需与该句的主句主语一致。在本句中,主句的主语是John,所以状语的逻辑主语也应是John,他应该是被问及姓名,故用被动语态asked。【译文】当被问及姓名时,约翰没有回答。

第2题:

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

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

第3题:

M: Oh, hi, What is your name again? Since this is only the 2nd day of school, I can’t remember the students’ names yet.

W: _________56_______I have a hard time remembering names myself.

M: Uh, Karen, right?

W: ________57________My mom’s name is Karen.

M: Nancy, Okay. I think I heard you were from England.

W: Well, I was born there, but my parents are American. I grew up in France.

M: _______58_________

W: But then we moved here when I was nine.

M: ________59________

W: Well, he is a college professor, and he is in Scotland at the moment.

M: How interesting! What does he teach?

W: Oh, I have no idea. ______60_______He teaches chemistry. A. So, what does your father do now?

B. It is okay.

C. Nah, just joking.

D. What’s your mother’s name?

E. Oh, a world traveler!

F. No, it is Nancy.


正确答案:B,F,E,A,C
56-60  BFEAC

第4题:

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

A、What's your last name?

B、What's your family name?

C、What's your name?

D、What's your first name?


参考答案:AB

第5题:

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

第6题:

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

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

第7题:

有以下程序: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”。

第8题:

–Hi. I’m your neighbor. My name is Steve Edwin.–().

A、What are you from?

B、Oh.

C、Yes, I know.

D、Hi. It’s good to see you. I’m Jane Peterson.


参考答案:D

第9题:

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

第10题:

若有以下说明,则能打印出“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"。

更多相关问题