Same code using string instead of string instead of character array


i am using hust string instead of character array and it has no repeated value as in case of character string (does string also passes by reference ?)

In case of string
Hi sajal , when you pass string in the function then it by default pass as call by value so it will not reflect changes in the original string . If you want to change the original string just pass it by reference.

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.