Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need answers for 1.1 , 1.2 ,1.3 and 1.4 using C programming language Thanks for h Activity 1 This program generates an array of

image text in transcribedI need answers for 1.1 , 1.2 ,1.3 and 1.4

using C programming language

Thanks for h

Activity 1 This program generates an array of random numbers between MIN and MAX using rand (). After that, the program shifts the array of several PLACES to the right or to the left. Task 1.1; Define the function: void printarray(int s_ptr, int e_ptr); that prints the given array. The parameters are the starting address of the array (first element) and the ending address of the array (last element). Task 1.2: Define the function: void shiftArrayToRightby(int array[], int size, int places); that shifts the given array to the right by a number of places. Task 1.3: Define the function: void shiftarrayToLeftby (int array[], int size, int places); that shifts the given array to the left by several places. Task 1.4: change the program in activity 1 and let the user to choose in which direction is the array should be shifted. Use the following new type of direction. typedef char direction; \#define right ' R ' || ' r ' \#define left ' L ' \| ' 1 ' For example, if the user enters ' R ' or ' r ', that means the program should shift the array to the right. Alternatively, 'L'or 'l' means the program should shift the array to the left

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

More Books

Students also viewed these Databases questions

Question

Have I incorporated my research into my outline effectively?

Answered: 1 week ago