[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Help to execute C Program Outputs



Hope these are the steps you followed ..assume your source file is in
/home/anand/mydirectory
[mydirectory]> gcc test.c

This will create a a.out file in 'mydirectory'..Then to execute
[mydirectory]> ./a.out

This will execute the file a.out (the "./" is a shortcut to execute from the current
directory)
Other alternatives will be
1. include 'mydirectory' in your path..by giving -export PATH=$PATH:mydirectory and then
execute the program starightaway at the prompt
2. give the full path name of your executable- /home/anand/mydirectory/a.out at the
prompt

Cheers
Aravind S





"Y.R.S.N.Srinivas Anand" wrote:

> Hello Friends
>
> I am a new comer to LINUX. I had written C Programs and compiled them without errors.
>
> My computer does not execute a.out even though Execute Rights are available.
>
> Kindly Help
>
> Y.R.S.N.Srinivas Anand
>
> ---------------------------------------------
> Find out more about this and other Linux India
> mailing lists at http://lists.linux-india.org/

--
Living on Earth is expensive, but it does include a free trip
round the sun