You are on page 1of 2

1.1.3 Natural language vs.

programming language
The translation we are referring to is made by a specialized computer
program called compiler. The process of the translation from a
high-level language into a machine language is called compilation.
Now let's get back to more interesting issues related to the process
of creating a new program. We already know that the main task is to
write the program in accordance with the rules of the chosen
programming language. Such a program (which in fact is just a text)
is called source code or simply source while the file which contains
the source is called source file.
To write the source code you will need a text editor that allows you
to manipulate text without any formatting information (for this
reason Microsoft Word isn't a good choice, in contrast to the Notepad).
This code is placed in a file and the name of the file should imply
its content. For example, it is common for a file containing the
source code in the C language to have its name ending with the
suffix .c, so if you wrote a computer program and decided to name
it "proggie" it would be a purposeful and reasonable idea to put the
source code into a file named proggie.c.
Next, your source code should be compiled. To do this you run an
appropriate compiler, instructing it where you stored the source code
that you want to be translated into the machine language. The compiler
reads your code, makes some quite complex analysis and its first goal
is to determine whether or not you made any errors during the coding.
These analyses are very insightful, but remember that they are made
by a machine, not a man and you should not expect too much from them.
OK, if your mistake was that you tried to add up two numbers using #
instead of +, the compiler will kindly ask you to be aware of that.
However, if you have typed a "-" instead of a "+", the compiler will
no longer be able to guess that your intention was to add two numbers,
rather than to subtract them. Do not expect that the compiler will
think for you. You have no reason to express regret about it - thanks
to that, developers are still needed.
If the compiler does not notice mistakes in your source, the result of
its work will be a file containing your program translated into the
machine language. That file is commonly called an executable file.
The name of the file depends on the compiler you use and the operating
system you are working with. For example, most compilers designed for
the Unix/Linux system create an output file named a.out by default.
Compilers designed for use in MS Windows can name this file the same
as the source file, only changing the suffix from .c to .exe.
We should admit that the whole process is actually a bit more
complicated. Your source code could be comprehensive and divided among
several or even dozens of source files. It may also happen that the
program is written not by you only, but by a team, in which case the
division of sources into multiple files is simply a must. In such a
case, the compiling splits into two phases - a compilation of your
source in order to translate it into machine language and joining
(or gluing) your executable code with the executable code derived from
other developers into a single and unified product. The phase of
gluing the different executable codes is commonly known as linking
while the program which conducts the process is named linker.
The C language is one of the huge numbers of programming languages
currently used and one of the oldest. It was created in the early
seventies of the twentieth century by Dennis Ritchie while he was
working in Bell Laboratories. Some say that C was a by-product of
a project which led to the very first version of the Unix operating
system. There are many other programming languages widely used
some of them could be regarded as C descendants. They even inherited
a name from their ancestor like C++ or C#. Others borrowed some
features from the original C and added lots of new ones like Perl,
Java or JavaScript.
What is the most common use of C? It is the so-called general-purpose
programming language, i.e., suitable for almost any programming
project and at the same time not particularly predestined to any
specific, narrow class of applications. Best if used for coding
drivers, embedded applications or operating systems (for example,
Linux kernel is mainly coded in C). You can also use it for
building complex utilities. We can assure you that knowing the
Clanguage is very helpful if you want to learn C++, C# or Java
The time you will spend learning the C language won't be wasted.

You might also like