C is a robust, structured programming language used for developing system software. By the design, C provides constructs that could be map efficiently to typical machine instructions. It was developed by Dennis Ritchie in Bell labs. The c program source is free-format text, using the semicolon as a statement terminator and curly braces for grouping the blocks of statements like conditions, functions or loops.
C is a compiled programing language. After creating a C program, first, you need to compile it using C compilers. It will generate the binary file, which you can run on your system.
This tutorial will help you to run a C/C++ program in Linux/Unix system through the command line. We will use ‘gcc’ and ‘g++’ commands from GCC (GNU Compiler Collection) to compile a C/C++ program. Here:
sudo yum groupinstall "Development Tools"
sudo apt-get install build-essential
For the example, I have selected C hello world program. Create a new file on your system as follows:
vim helloworld.c
using the below content