--C-=C-C--

From Esolang
Jump to: navigation, search

--C-=C-C-- is a stripped-down version of C (or C--) which would rather look esoteric (but Turing complete). There is no concept of object-oriented programming in --C-=C-C--, and the only type in --C-=C-C-- is "void", the only mathematical operations that can be done directly with operators in --C-=C-C-- are addition and subtraction, the only kinds of conditions are (var) (if var is not 0) and (!var) (if var is 0), the only condition operators are || (OR) and && (AND), and only one character can be inputted using getchar() or one character can be outputted using putchar() (stdio.h) at a time. A simple "Hello World!" program in --C-=C-C-- would look like this:

#include <stdio.h>
void main() {
	void a = 108, b = 111;
	putchar(72);
	putchar(101);
	putchar(a);
	putchar(a);
	putchar(b);
	putchar(32);
	putchar(87);
	putchar(b);
	putchar(114);
	putchar(a);
	putchar(100);
	putchar(33);
	return 0;
};