Home > Backend Development > C#.Net Tutorial > Is c++ a high-level programming language?

Is c++ a high-level programming language?

烟雨青岚
Release: 2020-07-06 09:18:14
Original
15622 people have browsed it

c is a high-level programming language. C is the inheritance of C language. It can perform procedural programming of C language, object-based programming characterized by abstract data types, and object-oriented programming characterized by inheritance and polymorphism. Design; and has the characteristics of supporting data encapsulation, hiding, inheritance, reuse, and polymorphism.

Is c++ a high-level programming language?

c is a high-level programming language.

Currently popular high-level languages ​​such as C, C, Visual C, Visual Basic, etc. all use the compilation method. It uses a compiler of the corresponding language to first compile the source program into a target program in machine language, and then connects the target program with various standard library functions and assembles it into a complete executable machine language program that can be executed.

C is the inheritance of C language. It can not only carry out procedural programming of C language, but also carry out object-based programming characterized by abstract data types. It can also carry out inheritance and Object-oriented programming characterized by polymorphism. While C is good at object-oriented programming, it can also perform process-based programming. Therefore, C is big or small in terms of the size of the problem it can adapt to.

C not only has the practical features of efficient computer operation, but is also committed to improving the programming quality of large-scale programs and the problem description capabilities of programming languages.

C language features:

Supports data encapsulation and data hiding

In C, classes support data encapsulation Tools and objects are the implementation of data encapsulation. C supports data encapsulation and data hiding by creating user-defined classes.

In object-oriented programming, data and functions that perform legal operations on the data are encapsulated together as a class definition. Objects are declared as variables of a given class. Each object of a given class contains a number of private members, public members and protected members specified by the class. Once a well-defined class is created, it can be viewed as a fully encapsulated entity that can be used as an integral unit. The actual inner workings of a class are hidden, and users of a well-defined class don't need to know how the class works, just how to use it.

Support inheritance and reuse

New types can be declared based on existing C classes. This is the idea of ​​inheritance and reuse. Through inheritance and reuse, you can organize the program structure more effectively, clarify the relationships between classes, and make full use of existing classes to complete more complex and in-depth development. The newly defined class is a subclass and becomes a derived class. It can inherit all non-private properties and methods from the parent class as its own members.

Support polymorphism

Use polymorphism to specify the behavior of each class. Polymorphism forms a tree structure consisting of parent classes and their subclasses. Each subclass in this tree can receive one or more messages with the same name. When a message is received by an object of a class in this tree, the object dynamically determines some usage of the message to be given to objects of subclasses. This feature of polymorphism allows for the use of high-level abstractions.

The combination of inheritance and polymorphism can easily generate a series of similar but unique objects. Due to inheritance, these objects share many similar characteristics. Due to polymorphism, one object can have a unique representation and another object have another representation.

Recommended tutorial: "C Language"

The above is the detailed content of Is c++ a high-level programming language?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
c++
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template