C: Setting Up

Compiling a C program requires a C compiler.

Mac systems come pre-installed with Clang, a compiler front-end and tooling infrastructure for the C family of languages like C, C++, Objective C/C++, OpenCL, CUDA, and RenderScript.

If you launch the terminal and type the following command

				clang --version
			

you would get the version string.

				
				Apple LLVM version 10.0.0 (clang-1000.11.45.5)
				Target: x86_64-apple-darwin18.2.0
				Thread model: posix
				InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
				
			

In Linux systems, it requires the installation of the GNU Compiler Collection (GCC).

In Fedora /CentOS systems, GCC can be installed by typing the below command onto the terminal

				sudo dnf install gcc
			

In Debian /Ubuntu systems, it would be

				sudo apt-get install gcc
			

The version of GCC installed can be checked typing the following command

				gcc --version
			

It would print out the version number, something like

				
				gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
				Copyright (C) 2013 Free Software Foundation, Inc.
				This is free software; see the source for copying conditions.  There is NO
				warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.