Take a look at the for loop that you used to get sum.
1 2 3 4 5 6 7
for (i = 0; i < 5; i++)
{
s = 0;
for(j=0;j<5;j++)
if (a[i][j] < 0) { s += fabs(a[i][j]); }
x[i] = s;
}
More specifically look at the inner for loop.
1 2
for(j=0;j<5;j++)
if (a[i][j] < 0) { s += fabs(a[i][j]); }
So your loop is able to add absolute values of negative floating to the sum JUST FINE using the if statement. But what if the the number is not negative? It doesn't get passed through the if condition so it doesn't get added to the sum at all!
Other than that everything seems fine to me. Also if you're going to add a headerfile just for the sake of fabs(), I would rather do something like s += (a[i][j]*-1.0) to avoid having to include math.h