问题 填空题

以下函数sstrcat的功能是实现字符串的连接,即将t所指字符串复制到s所指字符串的尾部。例如:,所指字符串为abed,t所指字符串为efgh,调用函数sstrcat后s所指字符串为 abcdefgh。请填空。
#inehde <stdio.h>
#include <string.h>
void sstuat(char * 9,char *t)
int n;
n = strlen (s);
while(*(s+n) = 【14】 )s++; t++;

答案

参考答案:*t

解析: 程序中,(a+n)代表字符串s最后一个字符后的,’\0’,根据题意,’\0’所在位置应该赋值为字符串t的第一个字符,字符中t的其他字符根据循环,依次赋值到,所指字符串的尾部,所以[14]应填:*t。

单项选择题
选择题