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.
+ 0 comments string s1,s2; cin>>s1>>s2; cout< // give some feedback tq
+ 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 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 comments Here are the solution of Strings in C++ Hacker Rank Solution
+ 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; }
Load more conversations
Sort 674 Discussions, By:
Please Login in order to post a comment