When we are compiling a C program the output is stored in a.out. How can we redirect the compiled output to another file?
Most C compilers provide the -o
option for this, such as:
gcc -o gentext gentext.c
cc -o mainprog -Llib -lmymath firstbit.c secondbit.o
xlc -o coredump coredump.c