To compile a code written in C we can use GCC. If GCC is not installed install GCC first and then use following command to compile a C code:
gcc RandomNumber.c -o RandomNumber
To run a c code use following command:
Above have been tested in Kali, Ubuntu.