a very basic question regarding gcc...

hi,
as the topic says.. i`m a newbie to the unix platform.. plz help me out here.
i create a .c file using "vi prog.c"
then write the code in it... then save n exit..
wat happend after tht.. ?? how do i compile n check the program???? i`ve been thru the manual pages of gcc but i cudn`t get anything.. anything i shud know specifically..?

thanx

hi,
ok ..got the respobnse to my question.. i had to use "./" b4 the output filename... fine.. now one more other doubt...

we have to run the output file using ./a.out (where a.out is the compiled, n linked file) .. now how can i run a.out without using "./" b4 the filename???

thanx

For that you have to include the pwd in the path. You can do that by running

PATH=$PATH:.; export PATH

in the sh/ksh/bash family of shells. Remember though, this is considered to be very insecure (especially if you are running as root).