Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Write a C program that generates 100 random numbers between 1 and 1000 and displays the minimum number and number of its occurrence implement

image text in transcribed

4. Write a C program that generates 100 random numbers between 1 and 1000 and displays the minimum number and number of its occurrence implement the following functions: in the array. Your program a. fillarray int nuns(1, int n): To generate 100 random numbers between 1 and 1000 and stores them in array nums b. recuraiveMinimum int numa[,int aize):a recursive function that returns the smallest element of the array. The function should stop processing and return when it receives an array of one element C. int findFreg (int nums[1 int size, int key) To find and retum the number of occurrence of the minimum number found by recursiveMinimum in the d. void displaykrray (int nuns[, int size: To display the array elements fle named as findMin.e, and submit the file onine as your solution 5. Wnte a C program which fils a matrix of size NxM with random integers between 0 and 100 input array (10 numbers in 10 rows). Save the program in a to this question. and sorts the matrik in descending order. N and M are the numbers of rows and columns entered by the user. The maximum number of rows and columns can be 100. Your program shoukd implement the following functions: a, void i11Matrix(int AI1t1,int N, int M):To generates NxM random numbers beween 1 and 100 and stores them in amayA b. int sortMatrix tint AL10.int rowsize,int col size) : To sort the input array c. void displayMatzix (int A1t,int , int N: To display the aray elements (N rows and M columns) Sample Interaction: Enter nunber of rowa: 100 Invalid size Enter nunbet of ows: Enter nunber of colunns: 3 Before Sorting: 1 8 2 4 5 6 3 79 After Sorting: 9 8 6 54 Save the program in a file named as sort2DArray.c, and submit the fle online as your solution to this question Please ensure that the following is completed on your assignment. . Change the name of the files to your firstnameLastname assignmentName such as minaMaleki assignment1.pdf Submit the following electronic files using the submission point located in the assignment 1 o firstnanelastname assignnentl-pdf (For questions 1-3) firstnaneLas tnamefindMia . c (For question 4? firatnaneLaatname sort2DArzay e (For question 5) o - o Do what is requested using the tools and knowledge that we have learned in Chapters 1-6, Code that includes anything that we have not yet covered will not be accepted Standard comments are included in your files

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions