Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 2
The code has been shared by Jay Matthews but I will add on that u do it with pass by reference also.. As that code has done it with pointers... There is concept of reference in cpp.. Use that