We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

C flavored BrainF*ck

From Esolang
Jump to navigation Jump to search

C flavoured BrainF*ck is a transpilation of Brainfuck to make it a proper subset of C to make it easier to learn.

The file begins with:

   #include <stdio.h>
   int main() {
       unsigned char tape[30000] = {0};
       int ptr = 0;

and ends with:

       return 0;
   }

The 8 commands are

> :

   ++ptr;

< :

   --ptr;

+ :

   ++tape[ptr];

- :

   --tape[ptr];

[ :

   while (tape[ptr]) {

] :

   }

. :

   putchar(tape[ptr]);

, :

   tape[ptr] = getchar();