4381bb2a22
When the execution reaches the end of the main functions, they implicitly return a successful status.
11 lines
269 B
C
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
|
|
}
|