i want to execute hello.c on red hat linux.i m having problem in compilation.where to save file hello.c and plz reply.i m waiting.
You can do that in any folder. I would make sure you have a C compiler installed. I believe RedHat comes with gcc, so at the command line, type:
gcc -v
If that comes up with a whole bunch of information (not errors), then you have gcc. Which means all you need to do is go to the folder where you have saved your hello.c and type:
gcc -o hello.out hello.c
The -o option will allow you to specify the output name - in this case hello.out. Otherwise, it will just be saved as a.out. Then you can run the program by typing
./hello.out
PS - I am moving this to the C++ Forum section from the Articles section. Please double check where you are before creating a thread next time. Thanks!