Question: please give c++ code and explain every line of the code don't give general answer Regards [10 marks] Write a function called copyStrick to copy

please give c++ code and explain every line of the code don't give general answer Regards
[10 marks] Write a function called copyStrick to copy the elements of an integer type stack, 51 . into another stack, s2, where both s1 and s2 are reference parameters, and s2 is initially empty. copyStack is a global function which is only allowed to use the standard stack ADT functions: push, pop, top (or peek), and empty. Furthermore, copyStack cannot create an extra array or any othet data structure, but it can use one or two extra variables. When the function ends, 52 contains exactly the same elements as s l, and s] is exactly as it was initially. Following picture shows an example, before and after copyStack: Before copyStack After copyStack
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
