C is not an interpreted language like Python or Perl. You cannot simply type C code and then tell the shell to execute the file. You need to compile the C file with a C compiler like gcc then execute the binary file it outputs.
For example, running gcc file.c will output a binary file with the name a.out. You can then tell the shell to execute the binary file by specifying the files full path ./a.out.
AsEdit:
As some comments and other answers have stated, there are some C “interpreters”interpreters that exist. However, but these generally compile theI would argue that C file into memory and execute them directlycompilers are more popular.