2
0

strcat.c 296 B

123456789101112
  1. #include <string.h>
  2. #include <stdio.h>
  3. #include "test_helpers.h"
  4. int main(void) {
  5. char dest1[12] = "hello";
  6. printf("%s\n", strcat(dest1, " world")); // should be hello world
  7. char dest2[12] = "hello";
  8. printf("%s\n", strncat(dest2, " world foobar", 6)); // should be hello world
  9. }