I am a newbie in C programming language. I am following a course right now, but I have a small problem which is run the file for testing.
I have opened gedit and I wrote those lines of code:
int main(int argc, char *argv[])
{
puts("Hello world.");
return 0;
}
and when I try to run it after giving the right permissions with this command
chmod +x file.c
and run by this command
./file.c
those lines show up in terminal
./file.c: line 1: syntax error near unexpected token `('
./file.c: line 1: `int main (int argc, char *argv[])'
Where is the problem ??