Question: Write a C program, You are given an array of integers containing positive numbers, negative numbers, and zeros in it. Calculate the sum of positive

Write a C program, You are given an array of integers containing positive numbers, negative numbers, and zeros in it. Calculate the sum of positive numbers, the sum of negative numbers, and the count of zeros in the array. Store the values in an array having, index 0 for positive-sum, index 1 for the absolute value of negative-sum, and index 2 for the count of zeros. Write a C program, You are given an array of integers

You are given an array of integers containing positive numbers, negative numbers, and zeros in it. Calculate the sum of positive numbers, the sum of negative numbers, and the count of zero's in the array. Store the values in an array having, index 0 for positive-sum, index 1 for the absolute value of negative-sum, and index 2 for the count of zero's. Now remember the steps to find the maximum count from the array, you need to write a program that can take an array and return the max count and its category. Sample Input Sample Output The sum of positive numbers is 12, the Absolute sum of negative numbers is Array: {1, 2,-1,-3, 0, -5,5, 0, 4, 19, and the count of zero's is 3. -10, 0} Therefore, max is 19 and category is absolute negative sum. Part a) Provide at least two sample input and output [4 marks] Part b) Descriptive solution [upto 5 marks] OR step-wise pseudo-code (may or may not be executable) [upto 10 marks] OR Submit executable program code with proper indentation and comments (using C Language) (upto 16 marks]

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!