Relationship between C and C++ Languages
Previously, C++ was an extension of the C language. In other words, C++ was a superset of C. In C language, the sign ++ was an increment, which is the process of adding value by 1. Thus, C++ means C+1. The value 1 here symbolizes support for object-oriented programming. As such, C++ is a C language that is supplemented by capabilities or support for object-oriented programming. Everything that can be done in C, can also be done in C++. However, this does not apply otherwise. Thus, all C++ compilers can be used to compile program code written in C language. However, you cannot compile program code written in C++ using C compiler.
Knowledge of C language is very helpful for you in the process of learning C++. However, you don't need to force yourself to learn C language first to work with C++. By learning C++, you are actually also indirectly learning C. C and C++ are very popular languages in the software industry. Both are classified in middle level languages. Today, both languages are also widely used in academic environments as a tool for teaching the basics of programming (algorithms, data structures, and object-oriented programming). According to Bjarne Stroustrup (creator of C++), C was taken as the basic language of the formation of C++ for the following reasons:
- Can run with low level languages
- Walk wherever and for any problem
- Runs smoothly in the UNIX operating system
Nice bro
ReplyDeleteThanks..
ReplyDelete