Let us call a 2-dimensional array of integers a magic matrix if the following conditions are true. The third column has no duplicate values. All values in the third 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 -44 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 9 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 X 9 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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

dont use string library 

its a C code

Let us call a 2-dimensional array of integers a magic matrix if the following conditions are true.
The third column has no duplicate values.
All values in the third 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 -44 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 9 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.
Transcribed Image Text:Let us call a 2-dimensional array of integers a magic matrix if the following conditions are true. The third column has no duplicate values. All values in the third 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 -44 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 9 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 1
1
-13 12 21 4
26 56 0
16
15 52 6
-24 46 -32 -11 6
53
59 -16 -10 62
11 11 -22 -34 -10
40
47
7.
5
33 -21 3
-13 27
14 28 13 -37 -23 -2 66 -3 -22
-33 -29 28 64 -37 -3 39 10
52
Sample run 2
9 2
3
4 5
5
7
6
1
3
4
5
4
6
7
2
7
4
5
1
3
5
6
6
5
1
2
6
7
4
5 6
4 1 6
1 7
1 2
2
3
3
7
6
1
512 345
Transcribed Image Text:Sample run 1 1 -13 12 21 4 26 56 0 16 15 52 6 -24 46 -32 -11 6 53 59 -16 -10 62 11 11 -22 -34 -10 40 47 7. 5 33 -21 3 -13 27 14 28 13 -37 -23 -2 66 -3 -22 -33 -29 28 64 -37 -3 39 10 52 Sample run 2 9 2 3 4 5 5 7 6 1 3 4 5 4 6 7 2 7 4 5 1 3 5 6 6 5 1 2 6 7 4 5 6 4 1 6 1 7 1 2 2 3 3 7 6 1 512 345
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY