C program that prompts for and reads a 2D-array Of size 3 * 5 rowise Solved

15.00 $ 7.50 $

Categories: ,

Description

Write an interactive C program that prompts for and reads a 2D-array Of size 3 * 5 rowise, it then calls a function getRowNum that prompts for and reads a row number and then it returns that row number, say n, if it is a valid for the array; otherwise it loops until the user enters a valid row number.

The main  function then passes the returned row number n and the 2D-array to a function distinctRowElements that returns a ID-array which contains the distinct elements Of row n Of the 2D-array together with the number of distinct elements in that row. The main function finally displays the returned array of distinct elements.

Note:

Your program must use appropriate loops.

The array reading must be done in the main and not in another function.

The function must not contain calls to VO functions.