Home > Tutorials > C Tutorials > Starting Off Programming in C

Starting Off Programming in C

The following series of tutorials are designed for people with little or no computer programming knowledge. They only require a basic understanding of either Windows or Unix and you must have a C compiler with an IDE, or you must understand how to use a plain text editor, such as vi (in Unix) or Notepad (in Windows).

Each tutorial in this series is listed below as they get written. You can always refer back here for the index, or follow along using the “continue to …” links located at the bottom of each post.

Before we jump into anything though it’s important to have a little bit of knowledge about C itself. In the early 1970s scientists at Bell Laboratories were struggling to produce a programming language to run on the new UNIX (1969) operating system. In 1971 Dennis Ritchie developed C, which has become one of the most popular and powerful programming languages. C is used to create software and a variety of other programs.

Like all programming languages, C must be compiled. A compiler is a program that translates human language (such as English) into machine language (binary code: 100100011…). When a program is compiled, it runs much faster and does not take up as much space in memory as a scripting language, which is stored in memory and is read line-by-line.

When you write a C program in a plain text editor, such as vi (Unix) or Notepad (Windows), you are creating a source code. This source code is saved in a file with the .c extension. This is called the source file.

After saving the source code, you must run it through the compiler, to translate the English instructions into binary code. This creates an object file, with the .o or .obj or .mix extension. If there are mistakes in your source code, the compiler will print error messages on the screen and refuse to compile your program. Simply go back into your source code and make the corrections, then run it through the compiler again.

Next, you must link the object code to the C libraries, which contain code modules for performing specific tasks. Once the libraries are linked to your object file, the computer creates an executable file with the .exe extension.

Finally you can run your C program.

Continue on to Directives and Functions.

About Michael Boguslavskiy

Michael Boguslavskiy is a full-stack developer & online presence consultant based out of New York City. He's been offering freelance marketing & development services for over a decade. He currently manages Rapid Purple - and online webmaster resources center; and Media Explode - a full service marketing agency.

Check Also

Installing Gnome Software Center on a Chromebook

Linux is pretty much all the rage these days when it comes to Chromebooks – ...

Like every other website, this site uses cookies to analyze our traffic. Cookies may also be utilized by our advertisers and partners. By using this website you agree to the use of said cookies. More Information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings, continuing to navigate past this message, or you click "Accept" below then you are consenting to the use of cookies on the Rapid Purple website.