Terminologies Related to Programming
Before we start learning C++, we will first explain what a programming language is and what some basic terminologies used in programming are. These terminologies are not language-specific and are common across all programming languages.
We'll cover the following
Computer program
A computer program is a set of instructions given to the computer to perform a particular task.
Coding | Programming |
---|---|
Process of creating instruction | Taking instruction and making the target obey them |
Machine language
Computers can only understand binary code. This effectively means that any input given to the computer must be in the form of 0s and 1s (binary).
After being given an input, a computer performs some operations and returns an output, which is also in the form of 0s and 1s. So how can a human understand and communicate with the computer? We have programming languages for this purpose.
Programming language
We have created some languages that we can use to communicate instructions to the computer. These languages are similar to human languages and like any other language, e.g. English, programming languages have some rules known as syntax. Programming languages are categorized into:
- Low-level languages
- High-level languages
Low-level languages
Low-level languages are like machine language and require extensive knowledge of machine hardware and working. Binary and assembly are low-level languages.
High-level language
High-level languages are like human language. C++, python, and all such languages are high level and require knowledge of syntax to work with them.
So how can a computer understand rules, or rather a syntax, of each language? We have compilers for this purpose.
Compiler
A compiler translates a high-level language to machine language. We write our instructions in a high-level language, called source code or program, and then the compiler translates the instructions for a machine to understand. This process is called compilation.
Get hands-on with 1400+ tech skills courses.