Quine is a nonempty [program](program.md) which prints its own source code. It takes no input, just prints out the [source code](source_code.md) when run (without [cheating](cheating.md) such as reading the source code file). Quine is basically a [self-replicating](self_replication.md) program, just as [in real world](irl.md) we may construct robots capable of creating copies of themselves (afterall we humans are such robots). The name *quine* refers to the philosopher Willard Quine and his paradox that shows a structure similar to self-replicating programs. Quine is one of the standard/[fun](fun.md)/[interesting](interesting.md) programs such as [hello world](hello_world.md), [99 bottles of beer](99_bottles.md) or [fizzbuzz](fizzbuzz.md).
From [mathematical](math.md) point of view quine is a fixed point of a [function](function.md) (not to be confused with [fixed_point arithmetic](fixed_point.md)) represented by the [programming language](programming_language.md). I.e. if we see the programming language as a function f(x), where *x* is source code and the function's output is the program's output, quine is such *x* that *f(x) = x*.
Quine can be written in any [Turing complete](turing_completeness.md) [language](programming_language.md) (according to [Wikipedia](wikipedia.md)), the challenge is in the [self reference](self_reference.md) -- normally we cannot just single-line print a string literal containing the source because that string literal would have to contain itself, making it [infinite](infinity.md) in length. The idea commonly used to solve this problem is following:
Yet a stronger quine is so called *radiation hardened quine*, a quine that remains quine even after any one character from the program has been deleted (found here in [Ruby](ruby.md): https://github.com/mame/radiation-hardened-quine).
In the [Text](plaintext.md) [esoteric programming language](esolang.md) every program is a quine (and so also a radiation hardened one).