LARGEST program to reverse a single line from stdin with no redundant code The biggest program that reads a single line (terminated by your choice from NULL/CR/LF/CRLF) from stdin, reverses it, then prints it to stdout.

No redundant code [code which could safely be deleted] such as

return ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


or redundant data that's used to stop code being redundant:

char* data = &lt;kernel source code&gt;;
if (md5sum(data) != &lt;hash&gt;) {
    return 1; //Fail for no good reason because it lets us add 1000000 lines of data
}


Basically, the largest implementation of a string reverse, with no obvious attempt to game the question.

[edit]

I am tempted to say that the code must be finite for unbounded input length, but there have been some clever and interesting O(>1) length solutions.  I instead ask that people avoid posting simple brute-force lookup-list solutions as separate answers (comments are fine!).
C# – Something about 90 KB, but actually, ~90×n for any n

See https://gist.github.com/mormegil-cz/8581459 for the full source code. A short preview version to taste:

var c1 = Console.Read();
if (c1 &gt; 0 &amp;&amp; c1 != 13)
{
    var c2 = Console.Read();
    if (c2 &gt; 0 &amp;&amp; c2 != 13)
    {
        var c3 = Console.Read();
        if (c3 &gt; 0 &amp;&amp; c3 != 13)
        {
            // ...
            Console.Write((char)c3);
        }
        Console.Write((char)c2);
    }
    Console.Write((char)c1);
}
Console.WriteLine();


And because writing the source code seems a bit repetitive, let’s use a simple tool:

void Main()
{
    const int MAX_DEPTH = 1000;
    Console.WriteLine("using System;");
    Console.WriteLine("using System.Text;");
    Console.WriteLine();
    Console.WriteLine("class C");
    Console.WriteLine("{");
    Console.WriteLine("\tstatic void Main()");
    Console.WriteLine("\t{");
    for (int i = 0; i &lt; MAX_DEPTH; ++i)
    {
        var indent = new string('\t', i + 2);
        Console.WriteLine("{0}var c{1} = Console.Read();", indent, i);
        Console.WriteLine("{0}if (c{1} &gt; 0 &amp;&amp; c{1} != 13)", indent, i);
        Console.WriteLine("{0}{{", indent);
    }
    var restIndent = new string('\t', MAX_DEPTH + 2);
    Console.WriteLine("{0}var rest = new StringBuilder();", restIndent);
    Console.WriteLine("{0}for (var c = Console.Read(); c &gt; 0 &amp;&amp; c != 13; c = Console.Read())", restIndent);
    Console.WriteLine("{0}{{", restIndent);
    Console.WriteLine("{0}\trest.Append((char)c);", restIndent);
    Console.WriteLine("{0}}}", restIndent);
    Console.WriteLine("{0}var restArray = rest.ToString().ToCharArray();", restIndent);
    Console.WriteLine("{0}Array.Reverse(restArray);", restIndent);
    Console.WriteLine("{0}Console.Write(new string(restArray));", restIndent);
    for (int i = MAX_DEPTH - 1; i &gt;= 0; --i)
    {
        var indent = new string('\t', i + 2);
        Console.WriteLine("{0}\tConsole.Write((char)c{1});", indent, i);
        Console.WriteLine("{0}}}", indent);
    }
    Console.WriteLine("\t\tConsole.WriteLine();");
    Console.WriteLine("\t}");
    Console.WriteLine("}");
}


Change MAX_DEPTH to get a larger score (or possibly an internal C# compiler error?).