Let's run C program (that we compiled on our own machine) on Judge0 API!

1. Write and compile it on your own machine.

Save this file as simple.c:

#include <stdio.h>

int main() {
    int a, b;
    scanf("%d %d", &a, &b);
    printf("%d\n", a + b);
    return 0;
}
simple.c

And compile it with:

gcc simple.c

2. Base64 encode compiled executable

To do this, you can use this simple script that I created. After downloading it, run:

./b64.py e a.out a.b64

3. Run it

Now go to Judge0 IDE,  copy content from a.b64 and paste is as source. For language choose Executable. Don't forget to add input, remember our simple.c knows how to add two numbers.

Here is a snippet with binary from my PC.

Image by Jan Vašek from Pixabay.