# Define a type which comprises a struct called “Maxima”. In this struct contains two int values…

Define a type which comprises a struct called

“Maxima”. In this struct contains

two int values a

and b. The purpose of this struct is to store

the largest two int values among a set of

integers. The value a is the largest number and

the value b is the second largest number. In order

to accomplish this task, you need to write the following

functions:

allzero( struct pointer ): This function sets

a and b values in a given struct

to zero.

newnumber( struct pointer , number ): This

function gets a number value and introduces it to

the set of integers to find the first and second largest values.

Namely, it will set a and b

properly such that a will be the largest number

introduced so far and b will be the second

largest. For example, if we consecutively call this function with

numbers 1, 4, 5, 2, 10, 3, then a

should be equal to 10 and b

should be equal to 5.

You are provided main() function for testing purposes.

DO NOT MODIFY IT!

} ܒܢܢ 1 #include 2 #include 3 4 // Define struct here 5 typedef //… 6 7 // write allzero(…) function here 8- void allzero(/*…*/) { 9 19 11 12 // Write newnumber(…) function here 13 void newnumber (/*…*/ { 14 15 16 17 18 // Test main() 19 // DO NOT MODIFY main() 29 // or your code will not be evaluated 21 – int main() { 22 Maxima m; 23 allzero(&m); 24 printf(“%d %dn”, m.a,m.b); // 0 0 25 newnumber (&m,5); 26 printf(“%d %dn”,m.a,m.b);// 5 27 newnumber (&m, 7); 28 printf(“%d %dn”,m.a,m.b);// 75 29 newnumber (&m, 15); 30 printf(“%d %dn”, m.a,m.b);// 15 7 31 newnumber (&m, 9); 32 printf(“%d %dn”, m.a,m.b);// 15 9 33 newnumber (&m, 2); 34 printf(“%d %dn”,m.a,m.b);// 15 9 35 return; 36 } 37 ////