Trying to compile a C program in linux (redhat 8.0). I type:
$ cc helloworld.c
and it compiles and puts "a.out" in the same directory. However, when I try to run the program by typing:
$ a.out
I get the error message:
-bash: a.out: command not found
Any ideas why that would happen? When I list the directory, "a.out" is highlighted in green, which I'm pretty sure means it's an executable. Why does it give me the error?
Thanks ahead.
$ cc helloworld.c
and it compiles and puts "a.out" in the same directory. However, when I try to run the program by typing:
$ a.out
I get the error message:
-bash: a.out: command not found
Any ideas why that would happen? When I list the directory, "a.out" is highlighted in green, which I'm pretty sure means it's an executable. Why does it give me the error?
Thanks ahead.