gcc filename.c -o./ hello
You can try https://www.onlinegdb.com/ this as well, works really well for me. You can also save code there.
gcc -o my_example main_process.c thread_function.c -lpthread