Bandpass Filter Implementation in C
There are a few potential issues:


Your code doesn't compute a full output vector, you just keep the last three samples (often referred to as "state variables". Your output should be a vector of the same length as the input
This is only a second order filter. Depending on the exact properties of your signal, this  may not be enough to isolate the component that you want. I'd recommended a Butterworth bandpass filter. In this case you can independently control the lower cutoff and the higher cutoff of your bandpass and also the steepness of the slopes. There are butterworth design tools in "Octave", see http://octave.sourceforge.net/signal/function/butter.html 
If you need to go to higher order filters, they should be implemented as "cascaded biquads" or "cascaded second order sections". There are tons of code examples to be found through google