The similar features of C and C++ is C itself. C++ is a superset of C, thus every C program is (or can be) a valid C++ program. C++ is more consistent and stricter than C, however, so some C programs may need some minor alterations in order to become C++ compliant. For that reason it is simpler to enumerate the differences than it is to enumerate the similarities.
The following list enumerates all the differences with respect to a C programmer compiling C code under C++.
1. In C++, assigning from void* is not permitted -- you must use an explicit cast.
int *x = malloc (sizeof (int) * 10); // C version
int *x = static_cast<int*>( malloc (sizeof (int) * 10)); // C++ version
2. In C++, a function MUST be declared before it can be used. Although most C programs do follow this convention, it is not strictly enforced.
3. In C++, we cannot invoke the main function from within another function of the same program.
4. In C++, main must return an int, however return 0 is implied if not explicitly stated at the end of the function.
5. In C++, multiple declaration of global variables is not permitted.
Provided a C programmer adheres to these conventions, the program will compile under C++. Everything else in C is fully compliant with C++.
The main features of OOP are the same regardless of the language. They are: encapsulation; data hiding; inheritance; and polymorphism.
G++ is the Gnu compiler's extension for C++. It is not a different language. It simply allows you to use the GCC compiler to write C++ code.
Java and C++ are similar because Java is based upon C++ insofar as they both have a very similar language and syntax. The similarity ends there, however. Java has a much simpler object model and is highly abstract, and therefore provides no low-level architecture routines. Code is compiled as byte code suitable for the Java virtual machine which, although highly-portable, adds an extra layer of abstraction that you don't get with C++, which compiles to native machine code with virtually unrestricted access to the low-level architecture and its features.
No. Data hiding is a feature of object oriented programming. C does not support OOP, and therefore has no private member access. All members are public in C.
MOVE, STORE, LOAD, or something similar, CPU-dependent.
No.
C# is inherited from c++ with some additional features
Object-oriented programming and stricter type-safety.
Java is not similar to C. Java is, however, similar to C++. Both C++ and Java are object orientated programming languages (OOPL's).
The main features of OOP are the same regardless of the language. They are: encapsulation; data hiding; inheritance; and polymorphism.
G++ is the Gnu compiler's extension for C++. It is not a different language. It simply allows you to use the GCC compiler to write C++ code.
Object oriented programming. General purpose. Cross-platform.
Yes we can compile a c program using c++ compiler. Because c++ evolved from the c. c++ have some additional features beyond c. c++ support almost all concepts used in c.
Yes, because C++ is a very popular language, and many systems are written in C, C++, or Java. (C is the predecessor of C++, and Java is similar to C++ in many ways.)
Java and C++ are similar because Java is based upon C++ insofar as they both have a very similar language and syntax. The similarity ends there, however. Java has a much simpler object model and is highly abstract, and therefore provides no low-level architecture routines. Code is compiled as byte code suitable for the Java virtual machine which, although highly-portable, adds an extra layer of abstraction that you don't get with C++, which compiles to native machine code with virtually unrestricted access to the low-level architecture and its features.
If I understand your question, they are similar because one language came from the other.
Yes, it is. Just make sure that you it though "Programs and Features" (Windows 7).