A person can be taught how to write, read and speak in English provided he is taught every part of the English language such as alphabets, punctuation marks, and meaning of words – and Rules for combining them correctly. We call such rules as Grammar. Once he learns all of them; he can be communicated and instructed to perform any kind of task. For example – Asking him to make tea, writing a script for a story… etc
But how can you communicate and instruct a computer to perform tasks? Is it possible through English? A computer can’t understand English. In order to do so, we have to learn a language that a computer can understand: C, C++, and JAVA are some of such languages
Similar to how you learn every element of English to fully understand the Language, Computer languages also have grammar and various elements that need to be learnt. In computer language Grammar is called as Syntax. So what are the elements of the Computer language? Before we learn what are its language elements let’s see the elements of English language as illustrated in the diagram below.
As you can see from the above diagram, we have to go through all the above process to learn the English language. Most importantly we have to know the rules to form sentences and organize the language structure. As I already mentioned this rules are called as English Grammar.
Now let’s look at how Computer language is organized. Look at the diagram below and make contrast between English and Computer language.
Note:• #, %,*,-, +…etc… Are called as Special Characters or Special Symbols
• If, else, typedef, enum…etc…are some of the examples of keywords
As you can see from the above diagram, just like English language, we have to go through above process in order to learn a computer language. Most importantly we have to know the rules to form instructions and organize the language structure. As I already mentioned this rules are called as Syntax.
You may also want to read this similar article: Meaning of Algorithm, Program, and Programming Language for a Common Man