Thursday, July 26, 2012

what is quine?

A quine is a computer program which takes no input and produces a copy of its own source code. That means, when you run the program, it should print exactly those lines which written by programmer in that program. These programs are also called self-replicating programs, self-reproducing programs, and self-copying programs.

How quine works: To implement this , we need to see the program in two parts, one is code and another is data. And data represents the textual form of the code(like placing code between quation marks). This is similar to "say 'say'" where first say is code and second say in quotes is data.
Implementation of the quine's concept completely depends on the programming language instructions. It may not be possible to impelement in some programming languages, mostly in all programming languages you can implement quine. Here is the quine implementation in C language.

No comments:

Popular Posts