How is memory managed in C++?
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
Because C++ enables dynamic memory, the user must manually manage memory instead of relying on a garbage collector function to do it. The "new" and "delete" operators are used to dynamically allocate and deallocate memory, respectively.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nashiinformaticssolutions
C++ uses manual memory management with new and delete and also provides smart pointers like std::unique_ptr and std::shared_ptr.
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you remove an element from a set in c++?
write a C++ programming :if the no is between 32 to 50 it will be odd.
class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list
What is isdigit c++?
What is the difference between a reference and a pointer?
What is heap sort in c++?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
Explain 'this' pointer and what would happen if a pointer is deleted twice?
Can I run c program in turbo c++?
What is a conversion constructor?
Can comments be nested?
Can we define a constructor as virtual in c++?