I strongly recommend that you do not use an IDE like KDevelop to learn programming. It hides everything from you, and instead of understanding the compilation process, you just hope it magically works when you push the button.
To compile a single source file:
Code:
gcc source.c -o name-of-executable
If you omit the "-o name-of-executable" part, it names the executable "a.out".