in the removeDuplicates function the return type is void so we can do operations in this function only.since, the return type is void how the changes reflects in the main function means how the removeDuplicates function returns the string since the return type is void how string operations reflects main function…because it is not possible…please explain me …
Confusion with the return
hello @rishabhkumargupta97
here in this problem we are using char array.
and in c++ arrays are passed as pointer ,which means whenever we modify the array that is passed in function , it will get reflected in original array becuase we will be modfying the content of same memory location.
that is the reason why we are not retruning anything from the function
char array and integer array both are passes as pointer…Right?
any type of array …
thankyou so much…
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.