why its wrong
string s=β1234β;
s[2]=β9β-s[2];
cout<<s;
Why it is not giving output 1264
@guptanikhil898
check this-
you were trying to store number 6 in s[2] while it should have a character so u have to do + β0β
to make it a character then store in s[2]
I hope your doubt is cleared donβt forget to mark it resolved in my doubts section 