fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. //char s1[100], s2[100], i, j;
  6. string s1="hello";
  7. string s2="world";
  8. s1=s1+s2;
  9. //printf("Enter first string: ");
  10. //scanf("%s", s1);
  11.  
  12. // printf("Enter second string: ");
  13. //scanf("%s", s2);
  14.  
  15. // calculate the length of string s1
  16. // and store it in i
  17. /* for(i = 0; s1[i] != '\0'; ++i);
  18.  
  19.   for(j = 0; s2[j] != '\0'; ++j, ++i)
  20.   {
  21.   s1[i] = s2[j];
  22.   }
  23.  
  24.   s1[i] = '\0';*/
  25. //s1=s1+s2;
  26. printf("After concatenation: %s", s1);
  27.  
  28. return 0;
  29. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:25: fatal error: bits/stdc++.h: No such file or directory
 #include <bits/stdc++.h>
                         ^
compilation terminated.
stdout
Standard output is empty