We're here to show you what the “C” language is and what we use it for. Let’s consider for a moment what language itself is, not only “C”, but any language people use. We’ll try not to resort to scientific-sounding definitions and, speaking informally, we can say that a language is a tool for expressing and recording human thoughts.
In other words, it's a mechanism known to us and to our partners that allows us all to understand each other and to be understood. We can use our language for speaking, writing, reading, listening, thinking and many others purposes.
At least one language accompanies us throughout our whole lives – it's our native language, our mother tongue, which we learn almost unconsciously at the very beginning of our lives. We will learn other languages, mostly as a result of a conscious decision, perhaps forced by social conditions or business needs, or perhaps simply out of personal interest.
The languages we use to communicate with other people are called natural languages. They were created over many centuries and still are subject to change. If we ignore languages that have been created artificially, such as Esperanto or even Quenya (the language used by the elves in Tolkien's world), we can say that natural languages have evolved almost independently, naturally; an evolution over which we have little or no control.
However, there are languages whose creation and development were and continue to be dictated by specific needs, and their development is fully subject to control by wide groups of people, such as international committees and work groups.
The shapes of these languages are defined by international standards, and although they are understood by many people, the exchange of thoughts between human-beings is not their most important application.
Such languages are, among others, programming languages. You are probably familiar with this concept already. A programming language is defined by a set of certain rigid rules, much more inflexible than any natural language.
For example, these rules determine which symbols (letters, digits, punctuation marks, and so on) could be used in the language. This part of the definition of the language is called lexicon.
Another set of rules determines the appropriate ways of collating the symbols – this is the syntax of the language.
We would also like to be able to recognize the meaning of every statement expressed in the given language – and this is what we call semantics.
Any program we write must be correct in these three ways: lexically, syntactically and semantically, otherwise it will neither run nor produce any acceptable results. You can be sure that in the course of your programming career, you’ll experience all of these errors: to err is human, and these humans write computer programs.
The expressive power of programming languages is much, much weaker than those offered by natural languages. We cannot (although we can try to) use a programming language to express human emotions, and it’s hard to imagine a declaration of love encoded in it. It’s a simple fact that the message embedded inside a computer program is not intended for a human, but for a machine.
Some might ask why we a need a programming language at all. That’s a good question, one we will try to answer for you now.
A computer, even the most technically sophisticated one, is devoid of even a trace of intelligence. You could say that it’s like a well-trained dog – it responds only to a predetermined set of known commands. These recognized commands are very simple. We can imagine that the computer responds to orders like “take that number, add to another and save the result”. A complete set of well-known commands is called an instruction list, sometimes abbreviated to IL. Different types of computers may vary depending on the size of their ILs and the instructions themselves could differ completely from one model to the next.
The IL is in fact the alphabet of a language, commonly known as a machine language. This is the simplest and most primary language we can use to give commands to our computer. We could say that it's the computer’s mother tongue.
Computer programming is the act of composing selected commands (instructions) in the proper order so that a desired effect is produced. The effect itself could be different in each case – it's up to the programmer's imagination, knowledge and experience to determine what that effect should be.
0 Comments
Tell us your queries or more topics which you want