I just switched from Windows to Ubuntu 11.10.
I wrote the following code in C with the text editor and saved it as HelloWorld.c in Documents.
#include <stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}
And I started the Terminal and enter the following commands:
cd Documents
gcc HelloWorld.c
A file called a.out, which, after some search on Google, is the executable. I entered this command:
a.out
But I get
a.out: command not found
Which step did I do wrongly?