You're being silly. You get a compiler, build the program you write (compile and link), and give the executable to your friend. You'll have to compile it on the same platform, or use a cross-compiler, but my money is on the supposition that you have the same platform.
If you don't know about compilers and what they produce, how the hell would you expect to write one?
