This is an example of a one character wonder. That's a program which is absolutely correct except for one misplaced character.


#include <iostream>

int main()

{

    std::cout << "Hello World/n";

    return (0);

}

Source code

Hint 1: What you see is what you get.

Hint 2: What you see is what you get -- literally.

Hint 3: If you see 13 characters between then double quotes, then 13 characters are printed.

Hint 4: There is no escape character in the string.

Answer: The statement:

std::cout << "Hello World/n";
prints "Hello World" a forward slash and a "n". What the programmer should have written was:
std::cout << "Hello World\n";

Main gallery