fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. char str1[1000];
  6. char str2[1000];
  7. char temp[1000];
  8. char substr[1000];
  9.  
  10. if(strlen(str1) > strlen(str2)){
  11. strcpy(temp, str1);
  12. strcpy(str1, str2);
  13. strcpy(str2, temp);
  14. }
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 5324KB
stdin
Standard input is empty
stdout
Standard output is empty