(b) Write the syntax of new and delete operator in C++. What are the advantages of using them instead of malloc () and free ()?

Explanation

The new and delete operator in C++ provide a more convenient and safer way to manage memory compared to malloc () and free (). They automatically handle memory management and avoid memory leaks.


โฌ† Related Topic

View Topic Hub โ†’

๐Ÿ“˜ Syllabus

View KERALA UNIVERSITY Class 4 Syllabus โ†’

๐Ÿ“ Practice Questions

Practice Previous Year Questions โ†’

๐Ÿค– Practice with AI

Generate Practice Question Paper โ†’


๐Ÿ“š Related Concepts