Question: PROGRAM MUST BE IN C LANGUAGE. PLEASE ANSWER QUESTION IN COMPLETE. THANKS! Randomizing arrays is a significant problem in Computer Science. Sometimes we want to

PROGRAM MUST BE IN C LANGUAGE. PLEASE ANSWER QUESTION IN COMPLETE. THANKS!

PROGRAM MUST BE IN C LANGUAGE. PLEASE ANSWER QUESTION IN COMPLETE. THANKS!

Randomizing arrays is a significant problem in Computer Science. Sometimes we wantto randomize an array of integers that contains all of the numbers

Randomizing arrays is a significant problem in Computer Science. Sometimes we want to randomize an array of integers that contains all of the numbers between l and some number "n" but which does not omit any numbers in between or contain any duplication of numbers. (Such a listing of numbers is called a permutation.) The purpose of this exercise is to demonstrate one technique for randomizing an array of permutations. It also gives us some exposure to the use of the random number generator in C. In addition to the function that randomizes the permutation array, please implement three other functions: a function that prints the array, a function that sorts the array, and a function that swaps two integers. These are described below Your program should perform the following steps: 1) In the main0 function a) Create an array of ints of size 100. b) Initialize the array with sequential numbers from 100 down to 1. (This will create a permutation.) c) Call the following functions in the following order: ll print original order i) printArray (int inputArr[], int size) ii) randomize Array (int inputArr0, int size) print randomized order iii) print Array (int inputArr0, int size) iv print sorted order v) printArray (int input Arrl], int size) 2) Function descriptions a) void printArray (int inputArrll, int size)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!