Given no flags to tell it what output file to create gcc will create a file called a.out in the working (i.e. current) directory. Assuming that the working directory is in your path then
it023:~> gcc simple.c it023:~> a.out will work, if the working directory is NOT in your path then you have to tell the shell where the a.out file is for it to run it. it023:~> gcc simple.c it023:~> ./a.out If you want to name the file something else then tell gcc: it023:~> gcc simple.c -o simple it023:~> ./simple