On all Unix systems further help on the C compiler can be obtained from the on-line manual. Type
man cc
on your local Unix system for more information.
Please note that Unix is a case sensitive operating system and files named firstprog.c and FIRSTPROG.c are treated as two separate files on these system. By default the Unix system compiles and links a program in one step, as follows:
cc firstprog.c
This command creates an executable file called a.out that overwrites any existing file called a.out. Executable files on Unix are run by typing their name. In this case the program is run as follows:
a.out
To change the name of the executable file type:
cc -o firstprog firstprog.c
This produces an executable file called firstprog which is run as follows:
firstprog
man cc
on your local Unix system for more information.
Please note that Unix is a case sensitive operating system and files named firstprog.c and FIRSTPROG.c are treated as two separate files on these system. By default the Unix system compiles and links a program in one step, as follows:
cc firstprog.c
This command creates an executable file called a.out that overwrites any existing file called a.out. Executable files on Unix are run by typing their name. In this case the program is run as follows:
a.out
To change the name of the executable file type:
cc -o firstprog firstprog.c
This produces an executable file called firstprog which is run as follows:
firstprog