Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
thanks

if i have a file called hello.c then i enter gcc hello.c to compile it but i dont know what to enter to run the program..?
./ is linux but i dont know what it is here
 
If you simply compile with the command 'gcc hello.c' it will create a executable called 'a.out'. To run this enter this into terminal './a.out'

To create a more meaningful name for the exec, use this:

gcc hello.c -o hello (gcc <sourcefile.c> -o <desiredname>)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.