fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5.  
  6. char *c = "xxxx; yyyy";
  7. char x[5], y[5];
  8. memcpy(x, &c[0], 4);
  9. x[4] = '\0';
  10. memcpy(y, &c[6], 4);
  11. y[4] = '\0';
  12. printf("'%s' '%s'\n", x, y);
  13.  
  14.  
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
'xxxx' 'yyyy'