Compile and Run C Programs from Terminal

preview_player
Показать описание
This tutorial demonstrates how to compile & run a c program from the terminal.At first you have to navigate to the directory where you stored
the source program.To navigate to that directory from my home directory I used the following command,

cd Desktop/workspace/

And to compile the c program,I used the following command,

gcc codelover.c -o codelover

Here, "codelover.c" is the source program name, "-o" stands for output and "codelover" is the executable file name.

To run the executable file,I used

./codelover