Wikipedia says it\'s called a quine and someone gave the code below:
char*s=\"char*s=%c%s%c;main(){printf(s,34,s,34);}\";main(){printf(s,34,s,34);} >
char*s=\"char*s=%c%s%c;main(){printf(s,34,s,34);}\";main(){printf(s,34,s,34);}
The trick here is that most compilers will compile without requiring you to include stdio.h.
stdio.h
They will usually just throw a warning.