We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. C++
  3. Strings
  4. Strings
  5. Discussions

Strings

Problem
Submissions
Leaderboard
Discussions

Sort 674 Discussions, By:

recency

Please Login in order to post a comment

  • ajayroy03377
    6 days ago+ 0 comments

    string s1,s2; cin>>s1>>s2; cout< // give some feedback tq

    0|
    Permalink
  • phatchill0918
    1 week ago+ 0 comments
    #include <iostream>
    #include <string>
    using namespace std;
    
    int main() {
    	string a,b;
        cin >> a >> b;
        cout << a.size() << " " << b.size() << endl;
        cout << a + b << endl;
        swap(a[0],b[0]);
        cout << a << " " << b;
        return 0;
    }
    
    0|
    Permalink
  • deepakkry_in
    2 weeks ago+ 0 comments

    include

    using namespace std; int main() { string a; string b; cin>>a; cin>>b; string c=a+b; cout<

    a[0]=b[0];
    b[0]=f[0];
    cout<<a<<" "<<b<<endl;
    

    }

    0|
    Permalink
  • gangadharghru67
    2 weeks ago+ 0 comments

    Here are the solution of Strings in C++ Hacker Rank Solution

    -1|
    Permalink
  • ashutoshlapt
    2 weeks ago+ 0 comments

    Code Is Here

    #include <iostream>
    #include <string>
    using namespace std;
    
    int main() {
    	string s1;
        string s2;
        cin>>s1>>s2;
        cout<<s1.size()<<" "<<s2.size()<<endl<<s1<<s2<<"\n";
        cout<<s2[0];
        for(int i=1; i<s1.size(); i++)
        cout<<s1[i];
        cout<<" "<<s1[0];
        for(int i=1; i<s2.size(); i++)
        cout<<s2[i];
        
      
        return 0;
    }
    
    0|
    Permalink
Load more conversations

Need Help?


View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy