I understood that it is not possible to run C code with gcc for a file in sdcard directories, sudo is required. But I see that it's possible to run Ruby files with Ruby. I don't understand why. Can someone say me what languages can be run in sdcard in the terminal?

@rproffitt Thanks so much. Your second link did help me a lot. It works perfectly.

But afterwards I tried to run a file after entering with cd in the directory where snippets are stored, I typed " clang filename.c -o filename" and the code was not compiled. I don't understand what would changed.

Just my guess. Permissions. Check the file permissions, ownership, etc.

Since you can not repeat your success, then you have to try it per the methods folk tell you it does work. My thought is this is not to be. You are trying to push the limits of this system and it is pushing back.

Why not use your PC for learning C and such?