Shouldn't the fucntion remove dupliactes have a copy of array and not the array itself?

Prateek bhaiya passed a character array to a function remove duplicates , he then did some modifications on the char array and just returned; he didn’t return anything from the function to the main function as the function had a return type void. So how is that the array which was modified in the remove character function , the array in main got those modifications, aren’t the arrays different? prateek bhaiya didn’t pass the character array by reference, so how is the main array also modified.

It is true that when you pass an array to a function that you are actually passing a pointer by value

for understanding pointer you can watch this Pointers

okay, i will watch the pointers section and if after that the doubt still remains, i will write it on this thread. thanks for the direction.

okay
no problem …

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.