hello.c:
Code:
#include <stdio.h>
int main(void)
{
printf("Hello world!\n");
return 0;
}
To compile and run hello.c:
Code:
$ gcc hello.c -W -Wall -O3 -o hello
$ ./hello
Hello world!
Linux and other operating systems do not require any specific file name suffix for programs. Any program you use must be in one of the directories listed in the PATH environment variable (just like in Windows), or you need to specify the exact path to it. When the program is in the current directory, current directory
./ is a suitable path. Any relative path, like
../hello if
hello was in the parent directory, will work too.
At this point, your major problem is that Windows is all you have experience with. You expect computers and environments to behave in a certain way -- the Windows way --, and that is just not the case. Unless you can drop the "Windows-isms", your expectations due to your Windows experience, you will be very, very frustrated.
If you can convince yourself that just because Windows works in a specific way, there is no reason to expect other computers behave the same way,
nor is there any reason to assume the Windows way is the best way, you will find Linux easy to learn and to get accustomed to. If not, well, I'd say you'd be happier sticking with Windows.