Files
RedBear-OS/tests/string/strcat.c
T
Tibor Nagy 4381bb2a22 tests: Remove redundant return statements
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00

11 lines
269 B
C

#include <string.h>
#include <stdio.h>
int main(void) {
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
}