In c' we can divide a large program into the basic building blocks known as function .The function is the collection of one or more statement that enclosed in {}.A function can be called multiple time to provide reusability and modularity to the C program In other words ' we can say that the collection of functions creates a program .The function is also known as procedure or subroutine in the programming languages
1. Write the shorts notes on Garbage collection. Ans. Garbage collection in C++ isn't native to the language; it relies on manual memory management using constructs like new and delete . However, some third-party libraries or smart pointers like std::shared_ptr and std::unique_ptr offer automated memory management. C++11 introduced smart pointers, reducing manual memory handling but lacking the automatic garbage collection found in languages like Java or Python. 2. What is multiple heritance? Ans. Multiple inheritance in C++ enables a class to inherit attributes and behaviors from more than one base class. It allows a derived class to access features from multiple parent classes, fostering complex class hierarchies but potentially causing issues like the diamond problem due to ambiguous member access. 3. What do you mean by operator overloading ? Ans. Operator overloading in C++ allows defining custom behaviors for operators like +, -, *, etc., for user-defined types. It enable
Comments
Post a Comment