-
-
How to reverse a linked list without usinf any pointer of c?
What are the different Abstract Data Type Groups?
Skill/Topic: Memory, Abstract Data Types, and AddressesA) Integer, Floating-Type, Character & Boolean are the four different data type groupsExplanation: You determine the amount of memory to reserve by determining the appropriate abstract data type group to use and then deciding which abstract data type within the group is right for the data. The different abstract data type groups are Integer, Floating-Type,...
The Data type of a declaration statement tells how much _____ to reserve and the kind of ______ that will be stored in that ______ location.
Skill/Topic: Variables and PointersA) Memory, Data, MemoryExplanation: The Data type of a declaration statement tells how much memory to reserve and the kind of data that will be stored in that memory location
A Pointer is a Variable.
Skill/Topic: Variables and PointersA) FalseB) TrueExplanation: A pointer is a variable and can be used as an element of a structure and as an attribute of a class in some programming languages such as C++, but not Java. However, the contents of a pointer is a memory address of another location of memory, which is usually the memory address of another variable, element of a structure, or attribute of...
Char *ptGrade;Which is the data type in this declaration?
Skill/Topic: Variables and PointersA) The data type in this is CharExplanation: The data type of the memory address stored in the pointer is of Character type
What is the purpose of the isEmpty() member method?
Skill/Topic: Stacks using an ArrayA) The isEmpty() member method determines if a value is at the top of the stack and is called before an attempt is made to remove the value
The keyword ___________ means that the attribute or member method is accessible only by a member method.
Skill/Topic: Stacks using an ArrayA) PrivateB) PublicC) Both a) and b)D) Neither a) nor b)Explanation: The keyword private means that the attribute or member method is accessible only by a member method. The instance of the class cannot directly access a private member of the class.
The ~Queue() member function is the Constructor ?
Skill/Topic: QueueA) TrueB) FalseExplanation: The ~Queue() member function is the destructor.It uses the delete operator to remove the array from memory when the instance of the Queue class goes out of scope.
What is the formula used to calculate the back of the queue?
Skill/Topic: QueueA) The back of the queue is calculated by using the following formula:back = (back+1) % size
How is the front of the queue calculated ?
Skill/Topic: QueueA) The front of the queue is calculated by front = (front+1) % size
The last member function is _____________.
Skill/Topic: Linked ListA) appendNode()B) destroyList()C) displayNode()D) structNode()Explanation: destroyList()is the last memeber function and is called to remove the instance of the LinkedList from memory.
Look at the following example LinkedList(){ front = NULL; back = NULL;}In this example, Both the front and back pointers are assigned a NULL value.
Skill/Topic: Linked ListA) TrueB) FalseExplanation: In this example of a the LinkedList constructor , Both the front and back pointers are assigned a NULL value.The purpose of the constructor in the linked list example is to initialize the front and back pointers as shown in the following definition. Both the front and back pointers are assigned a NULL value, which is used by the appendNode() member...
What is the use of displayNodesReverse() member function?
Skill/Topic: Linked ListA) The displayNodesReverse() member function displays the contents of a linked list in reverse order, beginning with the node at the back of the linked list and continuing until the first node is displayed
A doubly linked list is a linked list consisting of nodes that have both the previous and next elements.
Skill/Topic: Linked ListA) TrueB) False
Astack is a data structure that organizes data similar to how you organize dishes in a stack on your kitchen counter.
Skill/Topic: Stacks using Linked ListA) TrueB) False
Why is the constructor of the StackLinkedList class empty?
Skill/Topic: Stacks using Linked ListA) The constructor of the StackLinkedList class is empty because the constructor of the LinkedList class is called when an instance of the StackLinkedList class is declared. The constructor of the LinkedList class initializes the node and attributes that are
Why is the destructor of the StackLinkedList class empty?
Skill/Topic: Stacks using Linked ListA) The destructor of the StackLinkedList class is empty because the destructor of the LinkedList class is called prior to the destructor of the StackLinkedList class. This is because the LinkedList class is inherited by the StackLinkedList class.
__________ file contains the actual stack application.
Skill/Topic: Stacks using Linked ListA) StackLinkedListDemo.cpp
The isEmpty () member function must determine if the stack is empty.
Skill/Topic: Stacks using Linked ListA) TrueB) FalseExplanation: The pop () member function must determine if the stack is empty
Ans