c - is it possible to write a program which prints its own source code utilizing a "sequence-generating-function" -


It is possible to write a program that prints its own source code using "sequence-generating-function" is?

Which I call a sequence-generating-function is only a function that exits from a specific interval (i.e. printable ece-chatterters (32-126)) Now the thing is, it should be the source code of the sequence programs generated. As you see, executing an action that gives an arbitrary sequence is actually trivial, but in the implementation of the function in the returned sequence should , this is a very trivial task.

Such a program ( and related outputs) such as

  #include & lt; Stdio.h & gt; Int main (int x) {ins1; Ins2; Ins3; . . . Return y; } Int main {zero} {int i; (I = 0; i & lt; program size; i ++) {printf ("% c", funny (i)); } Return 0; } I personally think that this is not possible, but since I do not know much about the underlying substances, I have posted my thoughts here. I am really keen to hear some opinions! 

If you know how to encode an array function (you are saying that you If you already know how to do this then you can be guaranteed.

But to suspect Thomsey, there is a program generating function in it that uses only +, -, *, / or other functions that they use.

If your tuning is complete and the freedom to print like you is always possible.


Comments