Batch
@echo off
setlocal enabledelayedexpansion
set "a=H"
set "b=e"
set "c=l"
set "d=l"
set "e=o"
set "f= "
set "g=W"
set "h=o"
set "i=r"
set "j=l"
set "k=d"
set "l=!"
set "m=^"
set "n=%%"
set "o=^"
set "p=^"
set "q=^"
set "r=^"
set "s=^"
set "t=^"
set "u=^"
set "v=^"
set "w=^"
set "x=^"
set "y=^"
set "z=^"
set "0=^"
set "1=^"
set "2=^"
set "3=^"
set "4=^"
set "5=^"
set "6=^"
set "7=^"
set "8=^"
set "9=^"
echo %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z%%0%%1%%2%%3%%4%%5%%6%%7%%8%%9%
C#
using System;
namespace CursedHelloWorld
{
class Program
{
static void Main(string[] args)
{
Action<object> w = Console.WriteLine;
Func<string, string> s = x => x;
w(s("\x48\x65\x6c\x6c\x6f\x2c\x20\x57\x6f\x72\x6c\x64\x21"));
}
}
}
C++
#define _ -F<00||--F-OO--;
int F=00,OO=00;
extern "C" int printf(const char *format, ...);
int F_OO();
int main(){F_OO();printf("%1.15s\n","Hello, World!");}int F_OO()
{
_-_-_-_
_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_
_-_-_-_
return 0;
}
#include <iostream>
#include <string>
#include <sstream>
#define a(x) ((x) ^ (x))
#define b(x) ((x) ^ (~(x)))
#define c(x) ((x) ^ (x))
#define d(x) ((x) ^ (~(x)))
int main() {
const char e[] = "\x48\x65\x6c\x6c\x6f\x2c\x20\x57\x6f\x72\x6c\x64\x21";
std::string f(e, e + sizeof(e) - 1);
int g = a(b(0xDEADBEEF)) * c(d(0xCAFEBABE));
std::stringstream h;
h << f;
char i;
while (g == 0 && h.get(i)) {
std::cout << i;
}
std::cout << std::endl;
return 0;
}
#include <iostream>
#define H 72
#define e 101
#define l 108
#define o 111
#define w 119
#define r 114
#define d 100
#define ex 33
#define sp 32
int main() {
int arr[] = {H, e, l, l, o, sp, w, o, r, l, d, ex};
for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); ++i) {
std::cout << static_cast<char>(arr[i]);
}
return 0;
}
C
#include <stdio.h>
#define H "Hello, World!\n"
#define e int
#define l main
#define o (
#define w )
#define r {
#define d }
#define c return
#define p 0
#define a ;
e l o w r
printf o H w a
c p a
d
Cobol
*> MOST OF YOU DON'T EVEN KNOW COBOL OR MAYBE YOU KNOW A LITTLE.
*> I DON'T KNOW IF THIS IS CURSED OR NOT.
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-HELLO-WORLD.
05 WS-HELLO PIC X(5) VALUE 'HELLO'.
05 WS-WORLD PIC X(7) VALUE ' WORLD!'.
01 WS-COUNTER PIC 9(1) VALUE 1.
PROCEDURE DIVISION.
PERFORM VARYING WS-COUNTER FROM 1 BY 1 UNTIL WS-COUNTER > 2
IF WS-COUNTER = 1 THEN
DISPLAY WS-HELLO
ELSE
DISPLAY WS-WORLD
END-IF
END-PERFORM
STOP RUN
.
END PROGRAM HELLO-WORLD.
IDENTIFICATION DIVISION.
PROGRAM-ID. EXTRA-PROGRAM.
PROCEDURE DIVISION.
STOP RUN.
END PROGRAM EXTRA-PROGRAM.
HTML
<!-- Not really cursed because it just some misplaced stuff but still cursed and you can't see it in page. Is this considered to be programmming language? I guess not. Because y'know it's MARKUP language.-->
<!DOCTYPE html>
<html><head><style>body{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;}h1{font-family:sans-serif;color:#f00;transform:rotate(-5deg);}</style><head><body><h1 id="cursed"></h1><script>document.getElementById("cursed").innerHTML=String.fromCharCode(72,101,108,108,111,32,87,111,114,108,100,33);</script></body></html>
JavaScript
+[]["constructor"]["constructor"]("console.log(String.fromCharCode(72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33))")()
Lua
local a, b, c = "Hello", "World", "!"
local d = {a, b, c}
local e = {unpack = table.unpack or unpack}
local f = function(...) return ... end
local g = function(x) return x end
local h = function(y) return y end
local i = function(z) return z end
local j = function(...) return string.format("%s, %s%s", e.unpack({...})) end
local k = function(...) return f(...) end
local l = function(...) return g(...) end
local m = function(...) return h(...) end
local n = function(...) return i(...) end
local o = function(...) return j(...) end
local p = function(...) return k(...) end
local q = function(...) return l(...) end
local r = function(...) return m(...) end
local s = function(...) return n(...) end
local t = function(...) return o(...) end
local u = function(...) return p(...) end
local v = function(...) return q(...) end
local w = function(...) return r(...) end
local x = function(...) return s(...) end
local y = function(...) return t(...) end
local z = function(...) return u(...) end
local aa = function(...) return v(...) end
local ab = function(...) return w(...) end
local ac = function(...) return x(...) end
local ad = function(...) return y(...) end
local ae = function(...) return z(...) end
local af = function(...) return aa(...) end
local ag = function(...) return ab(...) end
local ah = function(...) return ac(...) end
local ai = function(...) return ad(...) end
local aj = function(...) return ae(...) end
local ak = function(...) return af(...) end
local al = function(...) return ag(...) end
local am = function(...) return ah(...) end
local an = function(...) return ai(...) end
local ao = function(...) return aj(...) end
local ap = function(...) return ak(...) end
local aq = function(...) return al(...) end
local ar = function(...) return am(...) end
local as = function(...) return an(...) end
local at = function(...) return ao(...) end
local au = function(...) return ap(...) end
local av = function(...) return aq(...) end
local aw = function(...) return ar(...) end
local ax = function(...) return as(...) end
local ay = function(...) return at(...) end
local az = function(...) return au(...) end
local ba = function(...) return av(...) end
local bb = function(...) return aw(...) end
local bc = function(...) return ax(...) end
local bd = function(...) return ay(...) end
local be = function(...) return az(...) end
local bf = function(...) return ba(...) end
local bg = function(...) return bb(...) end
local bh = function(...) return bc(...) end
local bi = function(...) return bd(...) end
local bj = function(...) return be(...) end
local bk = function(...) return bf(...) end
local bl = function(...) return bg(...) end
local bm = function(...) return bh(...) end
local bn = function(...) return bi(...) end
local bo = function(...) return bj(...) end
local bp = function(...) return bk(...) end
local bq = function(...) return bl(...) end
local br = function(...) return bm(...) end
local bs = function(...) return bn(...) end
local bt = function(...) return bo(...) end
local bu = function(...) return bp(...) end
local bv = function(...) return bq(...) end
local bw = function(...) return br(...) end
local bx = function(...) return bs(...) end
local by = function(...) return bt(...) end
local bz = function(...) return bu(...) end
local ca = function(...) return bv(...) end
local cb = function(...) return bw(...) end
local cc = function(...) return bx(...) end
local cd = function(...) return by(...) end
local ce = function(...) return bz(...) end
local cf = function(...) return ca(...) end
local cg = function(...) return cb(...) end
local ch = function(...) return cc(...) end
local ci = function(...) return cd(...) end
local cj = function(...) return ce(...) end
local ck = function(...) return cf(...) end
local cl = function(...) return cg(...) end
local cm = function(...) return ch(...) end
local cn = function(...) return ci(...) end
local co = function(...) return cj(...) end
local cp = function(...) return ck(...) end
local cq = function(...) return cl(...) end
local cr = function(...) return cm(...) end
local cs = function(...) return cn(...) end
local ct = function(...) return co(...) end
local cu = function(...) return cp(...) end
local cv = function(...) return cq(...) end
local cw = function(...) return cr(...) end
local cx = function(...) return cs(...) end
local cy = function(...) return ct(...) end
local cz = function(...) return cu(...) end
local da = function(...) return cv(...) end
local db = function(...) return cw(...) end
local dc = function(...) return cx(...) end
local dd = function(...) return cy(...) end
local de = function(...) return cz(...) end
local df = function(...) return da(...) end
local dg = function(...) return db(...) end
local dh = function(...) return dc(...) end
local di = function(...) return dd(...) end
local dj = function(...) return de(...) end
local dk = function(...) return df(...) end
local dl = function(...) return dg(...) end
local dm = function(...) return dh(...) end
local dn = function(...) return di(...) end
local _ = function(...) return dj(...) end
_(print)(j(dn(d[1]), dn(d[2]), dn(d[3])))
local t = {72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33}
local s = ""
for i, v in ipairs(t) do
s = s .. string.char((v - 1) % 256 + 1)
end
print(s)
PHP
<?php
$ h = 'H';
$e = 'e';
$l = 'l';
$o = 'o';
$w = 'W';
$r = 'r';
$d = 'd';
$exclamation = '!';
$worldVar = $w.$o.$r.$l.$d;
${$worldVar} = $worldVar.$exclamation;
$helloWorld = $h.$e.$l.$l.$o.' '.${$worldVar};
$broken = "echo \$helloWorld;";
eval($broken);
?>
Python
class H:
def __init__(s):print("Hello World!"); s.__class__.__name__ = "";_;_;_;
H();_;_;_;
# Does this work?
# Yesn't'
Rust
macro_rules! h {
($($t:tt)*) => {
$($t)*
};
}
fn main() {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
let _ = {
h!(println!("{}, {}!", "Hello", "world"));
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
Swift
import Foundation
typealias H = String
typealias E = String.Element
func add(_ string: H, _ element: E) -> H {
return string + String(element)
}
infix operator ⚡️: AdditionPrecedence
func ⚡️(_ string1: H, _ string2: H) -> H {
return string1 + string2
}
let h: H = "H"
let e: E = "e"
let l: E = "l"
let o: E = "o"
let space: E = " "
let w: E = "W"
let r: E = "r"
let d: E = "d"
let exclamation: E = "!"
let helloWorld: H = (h ⚡️ add("", e) ⚡️ add("", l) ⚡️ add("", l) ⚡️ add("", o)) ⚡️ add("", space) ⚡️ add("", w) ⚡️ add("", o) ⚡️ add("", r) ⚡️ add("", l) ⚡️ add("", d) ⚡️ String(exclamation)
print(helloWorld)
Unix Shell
#!/bin/sh
a=$(printf '\141')
b=$(printf '\142')
c=$(printf '\143')
d=$(printf '\144')
e=$(printf '\145')
f=$(printf '\146')
g=$(printf '\147')
h=$(printf '\150')
i=$(printf '\151')
j=$(printf '\152')
k=$(printf '\153')
l=$(printf '\154')
m=$(printf '\155')
n=$(printf '\156')
o=$(printf '\157')
p=$(printf '\160')
q=$(printf '\161')
r=$(printf '\162')
s=$(printf '\163')
t=$(printf '\164')
u=$(printf '\165')
v=$(printf '\166')
w=$(printf '\167')
x=$(printf '\170')
y=$(printf '\171')
z=$(printf '\172')
sp=$(printf '\040')
ex=$(printf '\041')
echo "${h}${e}${l}${l}${o}${sp}${w}${o}${r}${l}${d}$ex"
#!/bin/sh
a=$(printf '\141')
b=$(printf '\142')
c=$(printf '\143')
d=$(printf '\144')
e=$(printf '\145')
f=$(printf '\146')
g=$(printf '\147')
h=$(printf '\150')
i=$(printf '\151')
j=$(printf '\152')
k=$(printf '\153')
l=$(printf '\154')
m=$(printf '\155')
n=$(printf '\156')
o=$(printf '\157')
p=$(printf '\160')
q=$(printf '\161')
r=$(printf '\162')
s=$(printf '\163')
t=$(printf '\164')
u=$(printf '\165')
v=$(printf '\166')
w=$(printf '\167')
x=$(printf '\170')
y=$(printf '\171')
z=$(printf '\172')
sp=$(printf '\040')
ex=$(printf '\041')
echo "${h}${e}${l}${l}${o}${sp}${w}${o}${r}${l}${d}$ex"