Computer Science, asked by jk2119676, 5 hours ago

what is the features of c++? how they are different from C language which feature is useful according to you and why​

Answers

Answered by ponwinsiya
2

Answer:

Features of C++

1. OOP (Object-Oriented Programming)

C++ is an object-oriented language, unlike C which is a procedural language. This is one of the most important features of C++. It employs the use of objects while programming. These objects help you implement real-time problems based on data abstraction, data encapsulation, data hiding, and polymorphism. We have briefly discussed all the 5 main concepts of object-oriented programming.

The OOP concepts are:

Data abstraction: Data abstraction is an act of representing the important features of data without including the background details or the method applied to obtain it.

Data encapsulation: Data encapsulation is nothing but a process to implement data abstraction by wrapping up the data and functions into an exclusive block.

Inheritance: The term inheritance refers to transferring the properties of the parent class to the child class. We can implement the basic idea of inheritance by creating more than one class, which we formally refer to as derived classes by linking them with what we call the base class. This concept reduces the redundancy of the program and makes it easy to transfer/copy the properties of one class to another

Data hiding: Data hiding refers to protecting data from unauthorized access. It is basically responsible for securing the data. It is important to note that data encapsulation is different from data hiding as encapsulation mainly focuses on shifting the focus on important data than explaining its complex nature.

Polymorphism: The word poly means ‘many’ and morphism means ‘forms’. Clearly, polymorphism refers to displaying that data in more than one form.

Different from C language means:

It was a derived language

c++ is an object oriented language

Similar questions