更多"阅读程序: main( ) char strl[]='how "的相关试题:
[填空题]阅读程序:
main( )
char strl[]="how do you do",str2[10];
char * p1=strl,* p2=str2;
scanf("%s”,p2);
printf("%s”,p2);
printf("%s/n",p1);
运行上面的程序,输入字符串HOW DO YOU DO 则程序的输出结果是 【15】 。
[填空题]对于下列语句
char* strl = "Hello";
char * str2 =. "Hello";
*strl = ’P’;
cout<<str2<<end1;
其输出结果为: 【8】
[填空题]以下程序的输出是 【8】 。
main( )
char strl[]]="How do you do",*p1=strl;
strcpy(strl+strlen(strl)/2,"es she");
printf("%s/n",p1);
[填空题]对于下列语句
char* strl = "Hello";
char * str2 =. "Hello";
*strl = ’P’;
cout<<str2<<end1;
其输出结果为: 【8】
[填空题]设char strl[7]="ABCDEF",str2[5]="xyz";;则执行语句:
printf("%d",strlen(strcpy(str1,str2)));
后的输出是______。
[简答题]【程序说明】
函数int commstr(char * str1,char * str2,int * sublen)从两已知字符串str1和str2中,找出它们的所有最长的公共子串。如果最长公共子串不止1个,函数将把它们全部找出并输出。约定空串不作为公共子串。
函数将最长公共子串的长度送入由参数sublen所指的变量中,并返回字符串str1和str2的最长公共子串的个数。如果字符串str1和str2没有公共子串,约定最长公共子串的个数和最长公共子串的长度均为0。
【程序】
int strlen(char * s)
char *t=s;
while( * ++);
return t-s-1;
int commstr(char) *str1,char *str2,int *sublen
char*s1, *s2;
int count=0,len1 ,len2,k,j,i,p;
len1:=strlen(str1)
len2 = strlen(str2);
if(len1>len2)
s1=str1 ;s2=str2;
else len2 = len1;s1 = str2;s2 = str1;
for(j=len2;j>0;j--) /*从可能最长子串开始寻找*/
for(k=0; (1) <:len2;k++) /*k为子串s2的开始位置*/
for(i=0;s1[ (2) ]!=’/0’;i++;) /*i为子串s1的开始位置*/
/*s1的子串与s2的子串比较*/
for (p=0;p<j)&& (3) ;p++);
if ( (4) ) /*如果两子串相同*/
for(p=0);p<j;p++ /*输出子串*/
printf ("%c",s2[k+p]);
pri
[填空题]运行下面程序,其输出结果(str2的值)为 【13】 。
Dim strl, str2 As String
Dim i As Integer
str1="abcdef"
For i= 1 To Len(str1)Step2
str2=UCase(Mid(str1,i,1))+str2
Next
MsgBox str2
[填空题]运行下面程序,其输出结果(str2的值)为 【13】 。
Dim strl, str2 As String
Dim i As Integer
str1="abcdef"
For i= 1 To Len(str1)Step2
str2=UCase(Mid(str1,i,1))+str2
Next
MsgBox str2
[填空题]以下程序的输出是 。
main( )
char str1[]="How do you do",*p1=str1;
strcpy(str1+strlen(str1)/2"es she");
printf(’%s//n",p1);
[多项选择] What do you do to unwind How do you relax your mind
[填空题]以下程序的输出是 【8】 。
main( )
char str1[]="How do you do",*p1=str1;
strcpy(str1+strlen(str1)/2,"es she");
printf("%s/n",p1);
[简答题]{{B}}What do you do to unwind How do you relax your mind {{/B}}
[填空题]
I Know Just How You Feel
Do you feel sad Happy Angry You may think that the way you show these emotions is unique. Well, think again. Even the expression of the most personal feelings can be classified, according to Mind Reading game, a DVD displaying every possible human emotion. It demonstrates 412 distinct ways in which we feel the first visual dictionary of the human heart.
Attempts to classify expressions began in the mid-1800s, when Darwin divided the emotions into six types-anger, fear, sadness, disgust, surprise and enjoyment.
(46) . Every other feeling was thought to derive from Darwin’s small group. More complex expressions of emotions were probably learned and therefore more specific to each culture. But now it is believed that many more facial expressions are shared worldwide.
(47) . The Mind Reading DVD is a systematic visual record of these expressions.
The project was conceived by a Ca