Good languages say that to learn to program it is best to do it through Python, but there are those who say that, if a person knows what C ++ is, they have the world of programming at their feet. Well, not quite like that, but yes.
Why is it important to know what C ++ is? This programming language is the basis of important technological developments such as video games and operating systems. All thanks to the fact that its syntax comes from the father of most programming languages: C.
So, either because you are discovering the world of programming so far or because you already have the knowledge, it is best to always start with the basics. We are going to explain what a programming language is and why C is important so that you can understand exactly what C ++ is .
Here we go!
What is a programming language and why are we talking about C?
Just as there is the "language of love" there is the language of machines. The advantage of the latter is that it is much more logical and syntactic than the former. As they have been developed we no longer speak of machine languages, but of programming languages.
According to Rock Content, programming languages are a type of "writing" that is used to give orders to machines in order for them to perform different actions. Thanks to the advances of recent years, we can classify these languages into three categories.
Classification of programming languages
Before going on to explain what C is and what C ++ is, you have to learn about this classification of programming languages. In this way, it will be easy for you to differentiate the concepts and applications of each one. You will see!
Low-level programming languages
Do you remember that we told you about the language of machines? Well, here is that language that has a more abstract level and has a direct impact on the hardware, that is, it depends a lot on the machine.
In addition, because of how the logical instructions are constructed, it does not allow an ordinary person to understand it easily. Within this classification are:
Machine language with the use of binary code (0 and 1).
Assembly language is derived from machine language because it combines binary code with letters.
Mid-level programming languages
It is not a denomination that is used much today because programmers prefer to speak only of a low or high level. However, we want to explain it to you so that you can start learning what C ++ is.
In this category are the programming languages that allow modifying the hardware of a machine (which would be low level), but that also allow creating independent orders.
In other words, the code that is built does not depend on the hardware and can be executed on any machine. This is a characteristic of high-level programming languages.
What programming languages are in this classification? C and C ++. Although many prefer to classify them as low-level programming languages.
High-level programming languages
They are easier for human understanding since the code is no longer built solely on the basis of numbers and letters, but it acquires a syntax of human languages.
Here, the types of variables in programming where numerical values (integers, percentages, etc.), logical values (false or true), text strings (semantic values), among others, take more relevance.
However, these types of programming languages require compilers. What is a compiler? A mediator, that is, takes the code created in the high-level programming language and transforms it into a low-level one so that the machine understands it easily. An example of this type of programming language is Python.
What is C ++?
Although the C programming language has been around for a long time, your input has been very good. But, to maximize its benefits, just a decade later C ++ was created. The great inventor was Bjarne Stroustrup. Let's go with a little history!
It turns out that C is an evolution of a programming language called B, the purpose of C in the '70s was to facilitate the implementation of operating systems. So what is C ++?
To know what C ++ is, let's start with the idea that it is an extension of C. According to Engadget, Stroustrup created C ++ in the '80s with the purpose of extending the functionalities of C, above all, to be able to manipulate objects.
Differences between C and C ++
Although they are two of the most used programming languages in the world and are very similar, there are noticeable differences that will make you prefer one over the other. Let's get to know them below!
The most important difference between C and C ++ is that the latter is an object-oriented programming language.
In an object-oriented programming language, encapsulation of information is allowed. Only those who have access will be able to modify the classes! In C there are no classes, therefore there is no information hiding.
Have you heard of inheritance in programming? As C ++ is an object-oriented programming language, it allows the new classes that we create to adopt some characteristics of the classes we already had. This also does not happen in C.
And what if we have several different objects created with those classes? We can apply the polymorphism. This concept of object-oriented programming allows us to ship the same order (action) to objects, whether they have different classes. Something that definitely doesn't happen in C!
While C ++ opts for a structured programming paradigm, C uses procedural programming. The kind of procedural programming paradigm consists of not using repetitions, but rather that the function to be called must always be expressed. In C the lines of code are much longer! This also makes it difficult to fix bugs quickly.
What is C ++ for?
In addition to video games and operating systems, now that you know what C ++ is, these are other applications that you could make if you start programming in this language :
- Create text editors, important in computational and corpus linguistics.
- Manage databases like MySQL.
- Create browsers.
- Create different types of charts.
- Build compilers for other programming languages.
- Etc.
0 Comments
Tell us about the article so we write more passionately