There is a whole family of self-reproducing programs that extends
quite easily to bistable, tristable, etc. groupings as well as to
self-reversing programs and any other specified transformation:
/* this file is source.c */
main(){system("cat source.c");}
This reduces most such questions to triviality.