填空题
以下程序运行后输出的结果是______。
#include <string.h>
char*ss(char *s)
char *p,t;
p=s+1;t=*s;
while(*p)*p=*(p-1);p++;
*(p-1)=t;
return s:
main()
char *p,str[10]="abcdefgh";
p=ss(str);
printf("%s\n",p);
【参考答案】
aaaaaaaa
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
以下函数sstrcat()的功能是实现字符串的连接,即将t所指字符串复制到s所指字符串的尾部。例如:s所指字符串为abcd,t所指字符串为efgh,函数调用后s所指字符串为abcdefgh。请填空。 #include <string.h> void sstrcat(char *s,char *t) int n; n=strlen(s); while(*(s+n)=*t)______)
点击查看答案
填空题
已有定义如下: struct node int data; structnode *next, *p; 以下语句调用malloc函数,使指针p指向一个具有struct node类型的动态存储空间。请填空。 p=(______) malloc(sizeof(struct node));
点击查看答案
相关试题
下面函数将指针p2所指向的线性链表串接到p...
以下程序的运行结果是______。 # ...