Can a program output a copy of itself

前端 未结 11 1105
萌比男神i
萌比男神i 2020-12-29 23:07

I think this might be a classic question but I am not aware of an answer. Can a program output a copy of itself, and, if so, is there a short program that does this?

11条回答
  •  [愿得一人]
    2020-12-29 23:42

    Yes. Here's a C program that does it that I wrote about 20 years ago.

    http://womencht.reocities.com/Athens/8994/repeat.html

提交回复
热议问题