Files
RedBear-OS/tests/string/strcat.c
T
Jeremy Soller 9325183b21 Fix strcat
2018-12-01 08:55:02 -07:00

13 lines
302 B
C

#include <string.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
char dest1[12] = "hello";
printf("%s\n", strcat(dest1, " world")); // should be hello world
char dest2[12] = "hello";
printf("%s\n", strncat(dest2, " world foobar", 6)); // should be hello world
return 0;
}