DFT of complex signal using Goertzel algorithm in C
The Goertzel algorithm (which is really just an efficient way of calculating what amounts to a single DFT bin at an arbitrary location) is defined for complex input, just like the DFT. A real input signal is really just a special case where the imaginary part is equal to zero. As far as your last question is concerned, if your input signal is real, then its spectrum is conjugate symmetric. That means that the spectrum value at -4000 Hz is the conjugate of the value at +4000 Hz. If you want to differentiate between the two frequencies, you'll need a complex input signal.