下面函数的功能是( )。sss(s, t)char *s, *t;{ while( (*s) && (*t) && (*t++ == *s++) ) ;return(*s - *t);}
![](/upload/20220827/c85071da6ff0aadc10ebce6c25bb4f0d.png)
相似题目
-
下面函数swap_p的功能是完成交换两个指针的操作。请按指定的顺序在题后的相应序号后填上适当的内容,使之成为完整正确的函数。swap_p(s,t)int(),();{int*term;term=();*s=();*t=_();}
-
有以下函数 int fun(char *s) { char *t=s; while(*t) t++; return(t-s); } 该函数的功能是( ).
-
设有以下语句:typedef struct S{int g;char h;}T;下面叙述正确的是()。
-
阅读以下函数:fun(char s[],char t[]){int i=-1;while(++i,s[i]==t[i]&&s[i]!=’\0’);return(s[i]==’\0’&&t[i]==’\0’);}以上函数的功能是()。
-
有以下函数 int fun(char *s) { char *t=s; while(*t++); return(t-s); } 该函数的功能是( ).
-
关于以下fun函数的功能叙述中,正确的是()。intfun(char*s){char*t=s;while(*t++);t--;return(t-s);}
-
有以下函数 int fun(char *s) { char *t=s; while(*t) ++t; return(t-s); } 该函数的功能是( ).
-
关于以下fun函数的功能叙述中,正确的是_____。 int fun(char *s) { char *t = s; while(*t++); t--; return(t-s); }
-
有以下函数,关于该函数的功能的叙述正确的是______。int aaa(char *s){ char *t=s;while(*t++);t--;return(t-s);}
-
下面函数int fun1(char*x){ char *y=x;while(*y++);return(y-x-1);}的功能是( )
-
下面函数的功能是_____。sss(char *s, char *t){ int i = 0;while(t[i]){ s[i] = t[i];i++;}s[i] = ' ';}
-
下面函数的功能是_____。 sss(char s[]) { int i = 0; while(s[i]) i++; return i; }
-
本程序的函数 ver 是使输入的字符串按反序存放,在主函数中输入和输出字符串。 main() { char str[100]; scanf(\%s\,str); ver(str); printf(\%s\\n\,str); } ver( 【 1 】 ) char str[] { char t; int i,j; for(i=0,j=strlen(str);i
-
有以下语句typedef struct S {int g;char h;}T, 则下面叙述中正确的是( )。
-
下列函数的功能是set(s,t){ char *s,*t; while((*s)&&(*t)&&(*t++==*s++)); return(*s-*t);}
-
以下函数实现的功能是()。void fun (char *s){char *p,*q, temp;p=s;q=s+ strlen(s)-1;while(p<q)
-
【简答题】以下函数的功能是________。 int length(char *s) { int i; for(i=0;s++!='0';i++); return(i); }
-
16、以下函数my_cmp()的功能是比较字符串s和t的大小,当s等于t时返回0,否则返回s和t的第一个不同字符的ASCII码差值,即s>t时返回正值,s<t时返回负值。划线处应填入______。 include "iostream" using namespace std; int my_cmp(char *s,char *t) { while(*s == *t) { if (*s=='\0') return 0; ++s; ++t; } return ______; } int main() { cout<<my_cmp("abc","abcd")<<endl; system("pause");return 0; }
-
下面程序的功能是将字符串s的所有字符传送到字符串t中,要求每传递三个字符后再存放一个空格,例如字符串s为"abcdefg",则字符串t为"abc def g",请选择填空。 include "stdio.h" include "string.h" main() { int j, k=0; char s[60], t[100], *p; p=s; gets(p); while(*p) { for (j=1; j<=3 && *p; 【1】) t[k]=*p; if (【2】) { t[k]=' '; k++;} } t[k]='0'; puts(t); } 其中【2】应该填写
-
下面函数的功能是________。 sss(char *s, char *t) { int i=0; while(t[i]) { s[i]=t[i]; i++ ; } s[i]= '\0'; }
-
下面程序段的输出结果是()。 include<string.h> void main() char str1[10]="s","t","u","d","e","n","t"; printf("%d",strlen (str1));
-
下面程序的功能是用字符指针变量作函数参数编程实现字符串连接函数strcat()的功能,将字符串srcStr连接到字符串dstStr的尾部。 程序的运行结果如下: Please enter the source string:abcd↙ Please enter the other string:efgh↙ The concat is: abcdefgh 按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。 include <stdio.h> void MyStrcat(char *dstStr, char *srcStr); int main() { char s[80]; //源字符串 char t[80]; //待连接字符串 printf("Please enter the source string: n"); gets(s); printf("Please enter the other string: "); gets(t); //输入字符串 MySt
-
下面程序的功能是将字符串s的所有字符传送到字符串t中,要求每传递三个字符后再存放一个空格,例如字符串s为"abcdefg",则字符串t为"abc def g",请选择填空。 include "stdio.h" include "string.h" main() { int j, k=0; char s[60], t[100], *p; p=s; gets(p); while(*p) { for (j=1; j<=3 && *p; 【1】) t[k]=*p; if (【2】) { t[k]=' '; k++;} } t[k]='0'; puts(t); } 其中【1】应该填写
-
下面函数的功能是()。 a(s1,s2) char s1,s2; while(s2++=s1++);