You would need to cross compile it using its tool chain .
How am i supposed to do that??
Maybe copy C source application to Galileo, then compile on it, then execute. But remember: out file (executable) is NOT a shell script, so you CAN'T run sh (shell).
Just write something like:
galileo# ./a.out (and press ENTER).
Yes both are Linux distributions but they have some differences. More information about Yocto: http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html
root@quark:/# gcc code.c -o a.out root@quark:/# ./a.out
If you are using the Standard image you will have to install the needed tools