#include <string.h>
char *strncat(char *dest, const char *src, size_t n);
#include <stdio.h>
#include <string.h>
int main(void)
{
char str_1[128] = "hello";
strncat (str_1, " world", 3);
printf ("%s\n", str_1);
return 0;
}
$ ./strncat
hello wo
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |