I want to run a c program on ubuntu 18.04, on a virtual machine, and I get this error:
./test.c: line 3: syntax error near unexpected token `(' ./test.c: line 3: `void main(int argc, char** argv)'
I compiled and ran the file like this:
gcc -o test test.c ./test.c
I gave permission to the folder using:
sudo chmod a+rwx
I've searched online, and what I know is that ( is a special character in the shell/terminal but I could not understand/find a way to use it when I write code without error.
Can someone please help me solve this problem?