Is it fine??

L

Luke Meyers

Money said:
Is there any problem in using printf for printing the source of the
program.

Here
http://groups.google.co.in/group/co...m+that+prints+itself&rnum=11#cb2f7003e0d2b363

Andrew Koenig somewhat discourages to use printf to solve such problem.

Any suggestions?

Well, it's kind of a toy problem, so points of disagreement on it are
more likely to be based on aesthetic concerns than software engineering
concerns of real consequence. printf has known problems which are
sufficient to avoid it in practice; I see no reason why they are any
more or less valid in this context. It all depends on your
desirements. For toy problems, if it works, it works.

Luke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top