Friday Puzzler: Self-Print Challenge

First off, sorry for the lack of a challenge last Friday. I don’t even remember why I didn’t have one, but hopefully today’s will make up for it.

Today’s challenge is simple. Really! Write a program that, when executed, will display it’s own source code. Here’s the catch though - you can’t use cffile or any other file operation.

This idea isn’t mine - I read about programs like this a few weeks ago. I think they even have a name - but right now I can’t find it on Google.

Good luck!

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments