Let us call a 2-dimensional array of integers a magic matrix if the following conditions are true. The second column has no duplicate values. All values in the second column of the array appear in each row of the array. Write and run a C program with the flowing C functions Define and implement a function named randArray that receives two parameters: a 9 column -2-dimensional array of integers, and the number of rows in the array. The function should fill the array with random integer values in the range -88 to 66 (inclusive) Define and implement a function named printArray that receives two parameters: a 9 column - 2-dimensional array of integers, and the number of rows in the array. The function should print the contents of the array in a tabular format Define and implement a function named isMagic, that takes as a parameters a column - 2-dimensional array of integers, and the number of rows in the array and returns 1 if the a given array is a Magic matrix according to the above rules, and returns O otherwise. Implement the main function that performs the following: o Defines an integer 2D arrays a1 of size 6 X9 o Uses function randArray defined above to randomly initialize the array a1. o Uses function printArray to print the array a1 after initialization o Properly calls the function isMagic to determine if the array is magic matrix or not and prints the returned value. Sample run 2 43 -24 -23 71 4 63 10 73 65 48 41 26 14 75 -3 35 72 21 10 84 -3 -24 77 50 60 86 47 58 11 -21 14 22 -11 -1 60 85 42 46 63 -2 2 48 -16 32 -5 -31 -33 40 86 -1 51 75

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

in C language please 

Let us call a 2-dimensional array of integers a magic matrix if the following conditions are true.
The second column has no duplicate values.
All values in the second column of the array appear in each row of the array.
Write and run a C program with the flowing C functions
F
Define and implement a function named randArray that receives two parameters: a 9 column -2-dimensional array of integers, and the
number of rows in the array. The function should fill the array with random integer values in the range -88 to 66 (inclusive)
Define and implement a function named printArray that receives two parameters: a 9 column - 2-dimensional array of integers, and the
number of rows in the array. The function should print the contents of the array in a tabular format
Define and implement a function named isMagic, that takes as a parameters a column - 2-dimensional array of integers, and the number
of rows in the array and returns 1 if the a given array is a Magic matrix according to the above rules , and returns O otherwise.
Implement the main function that performs the following:
o Defines an integer 2D arrays a1 of size 6X9
o Uses function randArray defined above to randomly initialize the array a1.
o Uses function printArray to print the array a1 after initialization
o Properly calls the function isMagic to determine if the array is magic matrix or not and prints the returned value.
Sample run 2
43
-24 -23 71
63
10
73 65
48
41
26
14 75
-3
35 72 21
10
84
-3
-24 77
50
60
86
47
58 11
-21 14 22
-11 -1
60
85
42
46
63
1
-2
2
48
-16
32
-5
-31 -33 40
86
-1
51
75
Sample run 2
Transcribed Image Text:Let us call a 2-dimensional array of integers a magic matrix if the following conditions are true. The second column has no duplicate values. All values in the second column of the array appear in each row of the array. Write and run a C program with the flowing C functions F Define and implement a function named randArray that receives two parameters: a 9 column -2-dimensional array of integers, and the number of rows in the array. The function should fill the array with random integer values in the range -88 to 66 (inclusive) Define and implement a function named printArray that receives two parameters: a 9 column - 2-dimensional array of integers, and the number of rows in the array. The function should print the contents of the array in a tabular format Define and implement a function named isMagic, that takes as a parameters a column - 2-dimensional array of integers, and the number of rows in the array and returns 1 if the a given array is a Magic matrix according to the above rules , and returns O otherwise. Implement the main function that performs the following: o Defines an integer 2D arrays a1 of size 6X9 o Uses function randArray defined above to randomly initialize the array a1. o Uses function printArray to print the array a1 after initialization o Properly calls the function isMagic to determine if the array is magic matrix or not and prints the returned value. Sample run 2 43 -24 -23 71 63 10 73 65 48 41 26 14 75 -3 35 72 21 10 84 -3 -24 77 50 60 86 47 58 11 -21 14 22 -11 -1 60 85 42 46 63 1 -2 2 48 -16 32 -5 -31 -33 40 86 -1 51 75 Sample run 2
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education