Difference Between C Programing and C++ Programing in Tabular Form.
Sno. | Feature | C Programing | C++ Programinng |
---|---|---|---|
1. | Meaning | Computer Programing Language | General-Purpose Programming Language |
2. | Developed by | Dennis Ritchie | Bjarne Stroustrup |
3. | First appeared | 1972 | 1983 |
4. | Structured | Procedural Structured | Object oriented Language. |
5. | Program Design | Top down approach | Bottom up approach |
6. | Operator overloading | is not possible in C. | one of the greatest Feature of C++. |
7. | Namespace Feature | No namespace Feature | Namespace Feature is present for avoiding Name collision. |
8. | Relationship | C is subset of C++. | C++ is a superset of C. |
9. | Reference Variable. | Not Support | Support |
10. | Function used for Input. | scanf(“”); | cin>>variable; |
11. | Function used for Output. | printf(“”); | cout<<” “; |
12. | Polymorphism | not possible. | Polymorphism is the most Important Feature of OOPS. |
13. | Virtual Functions | No virtual Functions are present | Virtual Functions are used |
14. | Level | Low-level language | Middle-level language |
15. | Secure | Data is Unsecured | Data is hidden in C++ and is not accessible to external functions. Hence, is more secure |
16. | Concepts | Fuction | Function , Classes |
17. | Declaration | Multiple Declaration of global variables are allowed. | Multiple Declaration of global varioables are not allowed. |
18. | Datatype | built-in and primitive data types. | Support both built-in and user define data types. |
19. | Memory Allocation | malloc() and calloc() Functions are used for Memory Allocation and free() function for memory Deallocating. | new and delete operators are used for Memory Allocating and Deallocating |
20. | Pointers And Reference | C supports only Pointers | supports both pointers and references. |
21. | Error handling | Not Define Functions | Define Functions |
22. | Exception handling | Exception Handling is not present. | Exception Handling is done with Try and Catch block. |
23. | Header File | stdio.h | iostream.h |
24. | Program | #include <stdio.h> int main() { printf(“hello, world\n”); } | #include <iostream.h> int main() { cout<<“Hello, world!\n”; return 0; } |
25. | Filename Extensions | .c | .cpp |
(Visited 166 times, 1 visits today)
Written by: