Q:

Count percentage of audio samples exceeding a threshold

I have this practice question that I have an answer to:

In this stage of the project, you will identify any "danger" spots, in which the SPL is greater than or equal to 80
  dB (the value above which long-term hearing damage is likely to result). The simplest approach is to logically
  overlay a regular grid, and evaluate the SPL level at each point in the grid.
  For this stage, assume that the plant in question is in a field of size 78  78 meters, with edges perfectly aligned
  north-south and east-west.
  Add further functions and loops to your program so that it evaluates the sound intensity at every whole-number-of-meters
  grid point strictly within the field and on its boundaries (that is, at the points x 2 [0 : : : 78] y 2 [0 : : : 78],
  and counts the percentage of those locations at which the sound intensity is above the 80 dB threshold that
  indicates “risk of damage”.
  Note that you need to be a bit careful, because if you happen to test the exact location of one of the sound sources,
  a sound pressure level of infinity will be generated.
   (Note: SPL is the sound pressure level)

The SPLtotal is already given and I have derived it in the previous stage.
printf("\nStage 3\n========\n");

/* count points with sound levels above danger limit */
danger = total = 0;
for(i = 0; i <= SIZE; i++)      /* over length */
{
    target.y = i;
    for(j = 0; j <= SIZE; j++)  /* over width */
    {
        target.x = j;
        total++;
        if(spl_total(sources, count, target) > LIMIT)
            danger++;
    }
}
printf("Points sampled: %d\n", total);
printf("Above %.1f dB: %.1f%%\n", LIMIT, ((double)danger*100)/total);

I just want to see if the looping is done okay. Is this a good way to go or is there an alternative "cleaner method"?

A:

In C, the idiomatic way to iterate over an array of SIZE elements is:
for (int i = 0; i < SIZE; i++)
{
    …
}

The other way to write a loop that repeats N times is:
for (int i = 1; i <= N; i++)
{
    …
}

… but you wouldn't use that, since arrays in C are indexed starting from 0.
Mixing the two patterns, as you have done, is weird, and will likely lead to off-by-one errors when a future collaborator works on your code — if it isn't already a bug.

total could just be (SIZE + 1) * (SIZE + 1).

Omitting optional braces is bad practice.  Think of it as an act contributing to a future coding accident.  If you don't like wasting two lines of vertical space for braces, then adopt the more compact K&R-style braces.  If you really want to omit braces for some reaons, then put the body on the same line as the test.
    if (spl_total(sources, count, target) > LIMIT) {
        danger++;
    }

or
    if (spl_total(sources, count, target) > LIMIT) danger++;

