Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Language - Pogramming Exercise 3 - Array operations using recursive functions 3 marks] Exercise Objectives Identifying the base case(s) and recursive step used for

C Language - Pogramming
image text in transcribed
Exercise 3 - Array operations using recursive functions 3 marks] Exercise Objectives Identifying the base case(s) and recursive step used for processing arrays recursively implementing and calling recursive function that receives arrays as parameters Implementing array operations within recursive functions definitions Calling functions Problem Description Within replit.com IDE, create another new repl project) and name it Lab10xTUse this project to write and runa program that simulates a guessing game program your program should perform the following Use the symbolic constant to define the size of the array, consider the size as even number Declare a 10 array named items of the above size Declare the following functions as prototype and implement them after the main function Readitems, a recutive function receives an integer antay and prompts the user to input all of array elements. Hint. You can use static variable to keep track with array indices) Printitems(), this recursive function receives an integer antay and displays its elements. Hint: You can use static variable to keep track with any indices Page 4 of 5 Maxdtem, a recursive function receives an integer antay, then returns the maritem within array elements. [Note: Don't use math function PrintinReversel), this recursive function receives an integer antay and print array elements in reverse SumArray, this recursive function receives an integer array and two integer values representing the start and end of array. This function returns the summation of all elements from start to end In the main function Read items by calling Readitems(function Print items using Printitems() function o Compute the items average by calling itemsAverage Find the max element in items array by calling Maxitem Call SumArray for the two halves of the items array, both surmations are the same then print "This array is Symmetric Organize the output to appear as shown in the sample output below Download your project as zip file and keep it within your file system (Desktop for example Upload the project to the eLearning platform Sample Output Reading array items 12 10 17 8 Printing array items 8 12 10 5 178 The max item is 17 Printing array items in reverse 8 17 5 10 128 Sum of the first half - 30 Sum of the second half = 30 This array is Symmetric

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

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

What attracts you about this role?

Answered: 1 week ago

Question

How many states in India?

Answered: 1 week ago

Question

HOW IS MARKETING CHANGING WITH ARTIFITIAL INTELIGENCE

Answered: 1 week ago

Question

design a simple disciplinary and grievance procedure.

Answered: 1 week ago