Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please i want to do it by c++ language Question 1 Write a program that reads two arrays A1 and A2 ofn elements each. The
Please i want to do it by c++ language
Question 1 Write a program that reads two arrays A1 and A2 ofn elements each. The maximum size is 100. The program then creates an array A3 that contains the elements of A1 in reverse order. Finally, the program prints the array that is the sum of A2 and A3. Question 2 (a) Write a fimction prodArray that takes as parameters the array and its length then returns the product of its elements. 6) Write a program that reads 10 elements, store them in array then calls the fiuction prodArray Question 3 (a) Write a void function Shift that takes fou parameters A, np, d. A is the address of an array, n is the mumber of elements, p is the number of positions and d is the direction (L = left, R=night). 6) Write a program that reads an array of 10 elements then calls Shift twice and prints the array after each call. Sample Run: Enter 10 elements of array A: 17 11 12 15 18 19 20 23 28 39. Enter Shift direct L Enter number of positions 3 Array After Shift 15 18 19 20 23 28 39 0 0 0 Enter Shift direct R Enter number of positions 2 Array After Shift 0 0 15 18 19 20 23 28 39 0 Question 4 Write a recursive CH fiunction compare(strings, string t), which retums true ifs and t are equal. Then write a program to test your finction
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started