Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

Behavior: Managing Our Identities?

Answered: 1 week ago