Wednesday, June 19, 2019
Data Structure Using C++ Essay Example | Topics and Well Written Essays - 2000 words
Data Structure Using C++ - Essay ExampleIn the context of the above brief discussion, Big O greenback can be defined as a description of the growth rate of the order of a function T(N) as N becomes very outsize (Ellard 1997).In C++, the only difference between classes and structures is that all the members and nucleotide classes in structure are public by default, whereas, classes have private members and base classes by default.Dynamic Objects are those objects whose lifetimes are independent of the existence of the scope in which they were created and therefore, they give programmers a greater flexibility in managing the objects (Kafura 1996).In C++, a dynamic object can be created using a new operator which returns a cursor to a newly constructed object. On the other hand, to destruct a dynamic object in C++, a delete operator is used which takes an argument of a pointer variable that holds the pointer to the object that is returned by the new operator at the time of creating a dynamic object (Kafura 1996).The free store is a dynamic memory stadium which is available to allocate (by using the new operator) and deallocate (by using the delete operator) storage for objects during the execution of the program.A null pointer is a special phase of pointer which is distinguishable from all other pointer values and is not the address of any object or function. It is used to refer to the pointer which is not allocated or not pointing anywhere yet. However, it is important to note that a null pointer is not the same as an uninitialized value (Summit 1994).(a) A destructors is the special kind of function with the same name as its class prefixed by a (tilde) which is called for a class object to deallocate memory and do other cleanup for a class object and its class members when the object passes out of scope or is explicitly deleted. For exampleAn AVL tree, also called height balanced, is
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.