Question: 2. Name this program two.c-This program reads the name of a square two-dimensional array, and the size of this array, from the command line. It
2. Name this program two.c-This program reads the name of a square two-dimensional array, and the size of this array, from the command line. It reads the array into memory and then calls a function that computes the sum of all values on the borders (edges) of the array. In the two examples below, the border elements are the elements shown in red. 12 3 4Given the file DATA1 shown at the left, running 5 6 7 8 the program /a.out DATA1 4 would result in 9 10 11 12 the answer 102 13 14 15 16 Given the file DATA2 shown at the 1 2 3 right, running the program /a.out 45 6 7 8 9 DATA2 3 gives the answer 40 The code below can be downloaded from Blackboard. You must write the function sumBorders (everything else already exists). Hint: make sure you handle the special case of a 1xl matrix. include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
