Jump to content
  • Advertisement
Sign in to follow this  
Semion_N

Very Smart Programming Riddle

This topic is 4392 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I saw in one of the forums quite smart riddle: You should write a program which writes itself. This question and answer raised in very interesting article. If you want the article just ask but first- try to answer it by yourself.

Share this post


Link to post
Share on other sites
Advertisement
Programs that write themselves out are called quines, and there have been several of them out there for almost any language.

Share this post


Link to post
Share on other sites
Quines are pretty straightforward in most languages. Write a program that prints a string twice, make the string the same as the code, and tweak it a little.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!