No portable solution of this problem in standard C. The C character stream stdin is not keyboard stream, you may attach it to a disk file, for example, and your program does not know about that fact. Really, as mentioned by Sci@phy, some compilers clear stdin stream buffer - VC, for example:
http://support.microsoft.com/kb/43993
But in this case you must clear BIOS keyboard input buffer too (see the article). Regrettably, no garantee that fflush(stdin) will supported by MS for the future compiler versions.
As far as no portable solutions, you can use, for example, non-standard <conio.h> header with old console i/o functions. Better don't mix stdio and conio input in that case (write some problem-oriented console i/o functions to compact and clear your code).
I have seen "good advices" to read stdin char by char until '\n' or EOF occured. I think, it's a bad idea: there are situations when user/program dialog hangs.
Yet another solution: don't worry, make a simple and clear interface - that's enough

...