fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6. const char s1[] = "AAA \0\0\0\0\0";
  7. const char s2[] = "BBB";
  8. char *s3 = strcat(s1, s2);
  9. printf(" %s \n %s \n %s\n", s1, s2, s3);
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
 AAA BBB 
 BBB 
 AAA BBB