Question: Task 2: Write a C/CH function that takes 2 stacks, a and b, as arguments and copies the contents of a to b. void copystack

Task 2: Write a C/CH function that takes 2 stacks, a and b, as arguments and copies the contents of a to b. void copystack (struct stack *a, struct stack *b); b b a 18 18 5 12 18 5 12 12. Before function call After function call Task 3: Implement factorial function using a) Iterative solution (Write a user defined function) b) Recursive solution int factorial rec (int n) { if(n=0 n=1) return 1: else return n*factorial rec(n-1); } Write a simple main function to test your functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
