Home > Back-end >  Which bosses help look at the C code where is wrong, thank you all for bosses, famous for the humble
Which bosses help look at the C code where is wrong, thank you all for bosses, famous for the humble

Time:10-03

CodePudding user response:

The variable name wrong
Parameters of the variable name is arr r
yHandling code variable name is arr a
yChange can be consistent

CodePudding user response:

 double * grade (double array (*) [4], int n)//- arrry to array 

CodePudding user response:

Function parameter of grade and use function, parameter name to array,

In addition, the program has a bad habit:
Grade 1. The function of real depending on a parameter m, there is no limit to its minimum, maximum, this could lead to a pointer to access problems and can not get the correct values, m & lt; 0, the pointer before access to an array of a memory, m>=array for a number of rows, then the pointer to access the contents of the array after a
2. I value in a for loop without initial value (variable I define not initialise), that could lead to a for loop condition not satisfied to loop (I initial value & gt;=4); I initial value & lt; 0, the causes above m<0 similar problems, the pointer access exception
  • Related