String str=“donkey” 与 String str=new String(“donkey”) 一样吗?
第2题
A.Len(string),返回字符串string的长度
B.Trim(string),将字符串string前后的空格去掉
C.Split(strl,符号),根据符号将strl拆分成一维数组
D.Left(str,len),从右边取len个字符
第3题
第4题
编写类String 的构造函数、析构函数和赋值函数和测试程序。
已知类String 的原型为:
#include
#include
class String
{public:
String(const char *str=NULL); // 普通构造函数
String(const String &other); // 拷贝构造函数
~String(); // 析构函数
String & perator=(const String &other); // 赋值函数
void show()
{cout<< m_data<< endl;
}
private:
char *m_data; // 用于保存字符串
};
第5题
A.getParameter方法只用于接收POST请求参数,接收GET请求参数需要使用getQueryString方法
B.如果一个参数key有多个值,那么getParameter(key)方法会返回空
C.如果一个参数key有多个值,那么getParameterValues(key)方法会返回一个包含所有值的字符串数组
D.getParameter方法返回Object对象,使用前要强制类型转换:如String str=(String) request.getParameter(key)
第6题
A wit's tongue, is like a donkey's stick in that both______.
A.consider their victim's feelings
B.are gently persuasive
C.goad their victims
D.are used with definite purpose
第8题
听力原文: In the Netherlands and Belgium children do not have their fun and presents on Christmas Day as we do. They go to church on Christmas Day, and they have their fun on St. Nicholas Day, which comes on December 6. The night before, they fix something to hold their gifts. Sometimes it is a well-polished shoe, sometimes a plate or a basket, and sometimes they hang up their stockings just as we do. St. Nicholas rides a gray horse or a white donkey and so the children leave water for the animal to drink and something for it to eat. They leave hay or oats or a carrot, and sometimes a piece of bread. In the morning, if they have been good, they find that St. Nicholas has left sweets and fruits and playthings for them. But if they have been bad they find only a rod or a switch.
(37)
A.6th.
B.8th.
C.9th.
D.25th.
第9题
请写出下列程序的输出结果。()
#include
int main() /{
char str[ ]="1A2B3C4D"; int i;
for(i=0;str[i]!='/0';i++)
if ((str[i]<'0') || (str[i]>'9'))
printf("%c",str[i]);
return 0;
/}
}
第10题
A.MicrosoftVisual
B.MicrosoftVisualStudio6.0
C.Microsoft
D.MicrosoftVisualStudio6.0!
第11题
A.cout<<str[];
B.cout<<str;
C.cout<<&str;
D.cout<<str[0];