networking · beginner · ~15 min

Count IQ samples

Convert a byte count to a sample count.

Challenge

SDR captures store interleaved I/Q samples. Implement int iq_sample_count(int nbytes, int bytes_per_sample) returning how many complete samples fit (integer division), 0 if bytes_per_sample <= 0.

Starter code

int iq_sample_count(int nbytes, int bytes_per_sample) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.