Difference Between C and C++
Hello Friends, Hitesh is here, Today we will discuss the difference between C and C++. The main Difference between C and C++ is; C is Procedure Oriented Programming language but C++ is Object Oriented Programming Language.Variable Declaration
In C programming language you can't declare a variable anywhere in program But in case of C++ you can declare a variable anywhere in program.In C Programming
int a;In C++ Programming
printf("Hello");
cout<<"Hello";
int a;
- C is the top-down approach and C++ follow bottom-up approach.
- In C programming namespace features are not available but in case of C++ it is available.
- C programs are saved with .c extension and C++ programs saved with .cpp extension
- Operator overloading and Method overloading is not available in C but it supported by C++.
- Exception handling is supported by C++ but not by C language.
No comments:
Post a Comment