داتاستركتشر في< لغة السي > و لغة < السي بلس بلس>
من افضل للداتاستكتشر للتعلم لغة c ام c++ ?
ولماذا ؟ وماذا يختلف عن بعضهم البعض ؟ ومن ناحية سوق العمل وهكذا
اريد بالتفصيل ارجوكم
شكراً
C++ adds classes and object-oriented programming to the C language. As an object-oriented language, C++ has the ability to use data encapsulation and information hiding. Variables that were visible in C can now be hidden inside a class that only certain functions can access.
Because of this, C++ has much better data security over C, the latter having public variables that can be accessed by malicious code.
While both languages are statically typed, C only has support for primitive predefined data types, and those data types don’t include (shockingly) boolean or string data types. In C++, one can create user-defined data types along with the same primitives that exist in C (and, of course, boolean and string types).
C++ also supports operator overloading and function overloading, which gives developers the ability to assign a custom definition to certain operators, data, and functions. C++ also uses inline functions (over macro functions) for organization, try and catch blocks for error handling, and reference variables. C includes none of these features.
One of the main benefits of C is its direct control over memory and hardware. As a superset, C++ has the same control with easier tools to give programmers even more control, or even easier tools that give up that control. Therefore, one benefit to learning C would be learning the hard way to do things, but having more control over what you do later.
التعليقات