Features of C++
Features of C++
- Object Oriented
- The main upgradation from C to C++ is object-oriented programming. It follows concept of oops like polymorphism, inheritance, encapsulation, abstraction. This makes development and maintenance easier.
- Class
- Object
- Polymorphism
- Inheritance
- Encapsulation
- Abstraction
- Simple
- C++ provides a structured approach wherein you can break the problem into parts and design the solution modularly. It provides you a rich set of library functions that you can use while implementing the solution.
If you have worked with C language, then moving to C++ would be a very smooth transitioning. The syntax is almost similar with minute changes.
- Platform Dependent
- Platform dependent language means the language in which programs can be executed only on that operating system where it is developed & compiled. It cannot run or execute it on any other operating system.
C++ is a platform-dependent language. Having said that, C++ programs can be executed in many machines with little bit or no change.
- Mid-level programming language
- C++ has the ability to do both low-level & high-level programming. This is the reason why C++ is known as a mid-level programming language. When we talk about low-level programming, C++ is used to develop system applications such as the kernel, driver, etc.
- Structured programming language
- In C++ programming, the code is modular with the help of functions, classes & objects, and the modules are loosely coupled. Modular code is easy to understand & modify. This makes C++ a structured programming language.
- Rich Library
- Developers have access to lots of in-built functions provided by C++ language. This saves time & makes development fast. Let’s look at some of the C++ header files & functionalities provided by it.
- iostream: Contains C++ standard input and output functions
- iomanip: Contains stream manipulators that format streams of data
- cmath: Contains math library functions
- cstdlib: Contains function for conversions of numbers to text and vise versa, memory allocation, random numbers and various other utility functions.
- ctime: Contains function for manipulating the time and date
- fstream: Contains function for functions that perform input from files on disk and output to files on disk
- memory: Contains classes and functions used by the C++ Standard Library to allocate memory to the C++ Standard Library containers
- iterator: Contains classes for accessing data in the C++ Standard Library containers
- algorithm: Contains functions for manipulating data in C++ Standard Library containers
- Memory Management
- C++ supports dynamic memory allocation. You can free the allocated memory at any time. Not only this C++ also provides dynamic memory management techniques.
- Powerful & Fast
- C++ is a fast language as compilation and execution time is less. Also, it has a wide variety of data types, functions & operators.
- Pointers
- Pointers are variables that store the address of another variable. Pointer points to the memory location of a variable. C++ supports pointer and provides solutions to lots of problems that demand access to memory location.
- Compiler based
- C++ is a compiler-based programming language. Without compilation, no C++ program can be executed. The compiler first compiles the C++ program and then it is executed.
-
- Errors Finding
- It is easier to maintain a C++ programs as errors can be easily located and rectified. It also provides a feature called exception handling to support error handling in your program.
- Class
- Object
- Polymorphism
- Inheritance
- Encapsulation
- Abstraction
- Simple
- C++ provides a structured approach wherein you can break the problem into parts and design the solution modularly. It provides you a rich set of library functions that you can use while implementing the solution. If you have worked with C language, then moving to C++ would be a very smooth transitioning. The syntax is almost similar with minute changes.
- Platform Dependent
- Platform dependent language means the language in which programs can be executed only on that operating system where it is developed & compiled. It cannot run or execute it on any other operating system. C++ is a platform-dependent language. Having said that, C++ programs can be executed in many machines with little bit or no change.
- Mid-level programming language
- C++ has the ability to do both low-level & high-level programming. This is the reason why C++ is known as a mid-level programming language. When we talk about low-level programming, C++ is used to develop system applications such as the kernel, driver, etc.
- Structured programming language
- In C++ programming, the code is modular with the help of functions, classes & objects, and the modules are loosely coupled. Modular code is easy to understand & modify. This makes C++ a structured programming language.
- Rich Library
- Developers have access to lots of in-built functions provided by C++ language. This saves time & makes development fast. Let’s look at some of the C++ header files & functionalities provided by it.
- iostream: Contains C++ standard input and output functions
- iomanip: Contains stream manipulators that format streams of data
- cmath: Contains math library functions
- cstdlib: Contains function for conversions of numbers to text and vise versa, memory allocation, random numbers and various other utility functions.
- ctime: Contains function for manipulating the time and date
- fstream: Contains function for functions that perform input from files on disk and output to files on disk
- memory: Contains classes and functions used by the C++ Standard Library to allocate memory to the C++ Standard Library containers
- iterator: Contains classes for accessing data in the C++ Standard Library containers
- algorithm: Contains functions for manipulating data in C++ Standard Library containers
- Memory Management
- C++ supports dynamic memory allocation. You can free the allocated memory at any time. Not only this C++ also provides dynamic memory management techniques.
- Powerful & Fast
- C++ is a fast language as compilation and execution time is less. Also, it has a wide variety of data types, functions & operators.
- Pointers
- Pointers are variables that store the address of another variable. Pointer points to the memory location of a variable. C++ supports pointer and provides solutions to lots of problems that demand access to memory location.
- Compiler based
- C++ is a compiler-based programming language. Without compilation, no C++ program can be executed. The compiler first compiles the C++ program and then it is executed.
- Errors Finding
- It is easier to maintain a C++ programs as errors can be easily located and rectified. It also provides a feature called exception handling to support error handling in your program.
Comments
Post a Comment