Typecasting of two string values

here i have taken c1 and c2 as strings and the output was that these two concatenated in a single string
c1 = a c2 = b OUTPUT: ab
so ,can we say that + concatenates strings but in case of characters it impliciltly type cast the characters ?

#include

using namespace std;

int main(){

string c1,c2;
cin>>c1>>c2;
cout<<c1+c2;

return 0;

}

hello @rishabhsaklani391
yes right in case of strings the both the strings are concatenated.


for more you can see this :
if you still have any doubt you can ask here .
Happy Learning !!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.