Fast Fourier Transform in realtime

Google will help you here. C isn't really a "naked" language these days as they have tightened up the rules so you don't shoot yourself in the foot as easily.