fork download
  1. #include <iostream>
  2.  
  3. char *strcat(
  4. char *strDestination,
  5. const char *strSource
  6. ) {
  7. while(*strDestination) { strDestination++; }
  8. while(*strDestination++ = *strSource++);
  9. return strDestination;
  10. }
  11.  
  12. int main() {
  13. char src[] = "world";
  14. char dest[500] = "hello";
  15. strcat(dest, src);
  16. std::cout << dest;
  17. }
Success #stdin #stdout 0s 2828KB
stdin
Standard input is empty
stdout
helloworld