What is the difference in C and C++ in terms of memory management ?
-
Hello this is Gulshan Negi Well, I want to know about how C and C++ differ in terms of their memory management and performance capabilities, and what strategies can be used to optimize code and improve performance in each language? I need some suggestions on this. Thanks
-
Hello this is Gulshan Negi Well, I want to know about how C and C++ differ in terms of their memory management and performance capabilities, and what strategies can be used to optimize code and improve performance in each language? I need some suggestions on this. Thanks
-
Hello this is Gulshan Negi Well, I want to know about how C and C++ differ in terms of their memory management and performance capabilities, and what strategies can be used to optimize code and improve performance in each language? I need some suggestions on this. Thanks
Gulshan Negi wrote:
performance in each language
Performance is based on the following # Requirements - Most significant. # Architecture/Design (high level) # Implementation # Technology - Least significant. Your question fits into the last one of those. If you are very, very good at the first three or your problem (the complete solution) is very, very small then the last one might be the most significant.
-
The difference will depend very much on the implementation of the compiler and associated libraries.
C uses malloc and free for memory allocation while C++ uses new and delete for memory allocation. C does not provide direct support for error handling, while C++ supports exception handling that helps in error detection and smooth handling