I have a doubt regarding shallow and deep copy

So this problem with the shallow copying will only occur while we are using pointers, it will work for strings , int , and other data types or there is some other catch/

hello @laksh.rustagi12

only happens when there is pointer involved during copying.

no other catch

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.