Data Struc & Algo

Ace your homework & exams now with Quizwiz!

9. "What is the value of TOP when the STATIC STACK is FULL?"

*= to the (stack size - 1)

18. "STL lists are also efficient at adding elements at their back because they have a built in pointer to the last element in the list."

- TRUE

"The following are examples of primitive data structures, except."

Array

44. "Which of the following is an application of a stack?"

Calculator

28. "The manner in which a stack behaves?"

LIFO

"It is the memory address of a variable."

Pointer

"Abstraction means separating the logical properties from the implementation details."

TRUE

"Array is an example of homogeneous data structures."

TRUE

"Dynamic Stacks can be implemented using linked lists."

TRUE

"If a pointer variable pointing to the dynamic variable that was destroyed and becomes undefined is called dangling pointers."

TRUE

"In a DYNAMIC STACK, the node that was POPPED is deleted."

TRUE

"Pointer Variable is the content that is stored in the memory address."

TRUE

"The * operator in front of a pointer variable produces the variable to which it points. When used this way, the * operator is called the dereferencing operator."

TRUE

"When you apply delete to a pointer variable, the dynamic variable to which it is pointing is destroyed."

TRUE

"You can assign a name definition and then use the type name to declare variables using the typedef keyword."

TRUE

10. "In a static stack, the variable stackSize will handle the total capacity of the stack."

TRUE

11. "In a dynamic implementation of the stack, the pointer TOP has an initial value of NULL."

TRUE

14. "list.unique(); unique removes any element that has the same value as the element."

TRUE

15. "Below is a valid declaration of a dynamic stack implemented as a list: stack< int, list<int> > iStack;"

TRUE

16. "Pop function will always retrieve the top."

TRUE

17. "A linked list is a series of connected nodes, where each node is a data structure."

TRUE

20. "In a dynamic stack, the pointer TOP is like the HEAD which always points to the first element of the linked list."

TRUE

21. "A linked list can grow or shrink in size as the program runs."

TRUE

24. "Insertion and deletion of nodes are quicker with linked lists than with vectors."

TRUE

25. "In addition to the data, each node contains a pointer, which can point to another node."

TRUE

32. "In inserting a node, finding its proper location and following a certain order is necessary."

TRUE

33. "The list container, found in the Standard Template Library, is a template version of a doubly linked list."

TRUE

35. "The STL function top returns a reference to the element at the top of the stack."

TRUE

36. "A stack container that is used to adapt to different containers, it is often referred to as a container adapter."

TRUE

39. "The algorithm for displaying the elements of a linked list would require traversal."

TRUE

41. "Use of a template will make the ADT flexible in terms of accepting values of different data types."

TRUE

42. "A doubly linked list has both a next and previous node pointers."

TRUE

6. "Traversing means visiting each node of a linked list one by one."

TRUE

7. "cout << list.back() << endl; The back member function returns a reference to the last element in the list."

TRUE

"A Tree is unordered lists which use a 'hash function' to insert and search."

FALSE

"ADTs support abstraction, encapsulation, and information binding."

FALSE

"An ADT is a relational model, together with various operations defined on the model."

FALSE

"Any new dynamic variable created by a program consumes some of the memory in the freespace."

FALSE

"Primitive data structures are derived from non-primitive data structures."

FALSE

"Remove operator eliminates a dynamic variable and returns the memory that the dynamic variable occupied to the freestore manager so that the memory can be reused."

FALSE

"The STL list function push_back is equivalent to inserting a node in a list."

FALSE

"The non primitive data structures emphasize on structuring of a group of homogeneous data items only."

FALSE

12. "Below is a valid declaration of a dynamic stack implemented as a vector: stack< int > iStack"

FALSE

13. "The STL empty function will yield a value of true if the stack has elements."

FALSE

19. "During a POP operation in a STATIC STACK, the elements are being moved one step up."

FALSE

23. "Invoking the STL function top will automatically retrieve the element and move the pointer."

FALSE

26. "cout << list.front() << endl; front returns a reference to the last element of the list."

FALSE

29. "The initial value of index top in the static implementation of a stack is 0."

FALSE

31. "The STL function push retrieves an element at the top of the stack."

FALSE

34. "In a dynamic stack, pointer TOP points to a fixed value in the linked list and does not move."

FALSE

37. "In a DYNAMIC STACK, the pointer TOP stays at the HEAD after a PUSH operation."

FALSE

38. "Appending a node means adding a node at the start of the list."

FALSE

40. "The delete operation only involves removing the node from the list without breaking the links created by the next pointers."

FALSE

43. "list [int] myList; // is a valid declaration"

FALSE

5. "Using the pop function automatically moves the top pointer to the next node without deleting the memory used."

FALSE

8. "A circular linked list has 2 node pointers."

FALSE

22. "This node is responsible for handling the data that will be added to the linked list."

newNode


Related study sets

the chemical level of organization chapter 2 A&P

View Set

XCEL Chapter 11, XCEL Finial Study PRE-EXAM

View Set

Computer Concepts Module 4 QuickChecks

View Set

Ch 1 The Uniform Securities Act - Definitions

View Set

Chapter 6 - Personality (and the emerging self) - 175 - 187

View Set

Economic Globalization Assignment

View Set

exam 3 Entrepreneurship chapter 11

View Set