Can anyone give me an example of a basic buffer overflow in C that is done in one source file?

Every tutorial/paper/example that I've looked at, utilize the argv array. I don't want that.

I don't want it to be in two source files, e.g. vuln.c and exploit.c.

I also want to do it directly, which means overwrite the EIP with an address I want.
Not use NOP sled and shellcode.