Question: Question 5 (20 marks) (a) List TWO advantages of using functions in a C-Program. (4 marks) (b) Write the implementation of a C-Program function named

 Question 5 (20 marks) (a) List TWO advantages of using functions

Question 5 (20 marks) (a) List TWO advantages of using functions in a C-Program. (4 marks) (b) Write the implementation of a C-Program function named Checksign that takes as input an integer number and returns a T if the number is positive, a 1' if the number is negative, or otherwise it returns a 'o'. (5 marks) (c) Consider the following C-Program. #include int main(void) int myArr[]=(-2,3,-4): /* Your code goes here */ return 0; Complete the program above so that it performs the following task: The program will need to make function calls to the checksign function defined in (b) to check the sign of the each value in the array myrrt] and will need to convert any negative value to a positive value. (4 marks) (d) Explain what you understand by the term "modular decomposition' when writing C- programs. (3 marks) (e) List TWO advantages of using a modular decomposition approach when coding C. programs. (4 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!