olibc/src/tests/string/strncat.c

12 lines
229 B
C
Raw Normal View History

2021-12-19 08:35:56 +00:00
// This is test program for strncat function from string.h
#include <string.h>
#include <stdio.h>
int main() {
char s1[] = "Hello,";
char s2[] = " World! this should be in output";
puts(strncat(s1, s2, 7));
return 0;
}