Exam 13: Pointers and Linked Lists
Exam 1: Introduction to Computer and C++ Programming56 Questions
Exam 2: C++ Basics57 Questions
Exam 3: More Flow of Control45 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value53 Questions
Exam 5: Functions for All Sub Tasks54 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes52 Questions
Exam 7: Arrays48 Questions
Exam 8: Strings and Vectors69 Questions
Exam 9: Pointers and Dynamic Arrays39 Questions
Exam 10: Defining Classes61 Questions
Exam 11: Friends, Overloaded Operators, and Arrays in Classes56 Questions
Exam 12: Separate Compilation and Namespaces41 Questions
Exam 13: Pointers and Linked Lists64 Questions
Exam 14: Recursion48 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates35 Questions
Exam 18: Standard Template Library59 Questions
Select questions type
What C++11 keyword can you use instead of NULL to distinguish between the null value and the number 0?
Free
(Short Answer)
4.8/5
(37)
Correct Answer:
nullptr
There is no need for error checking when pushing a stack.
Free
(True/False)
4.8/5
(39)
Correct Answer:
False
What happens if you have two lists list1, list2), no assignment operator in your class, and attempt to execute the following statement?
List1 = list2;
Free
(Multiple Choice)
4.7/5
(44)
Correct Answer:
C
Given the following stack declaration, which of the following function definitions would correctly implement the destructor?
Struct StackFrame
{
Char data;
StackFrame *link;
};
Typedef StackFrame* StackFramePtr;
Class Stack
{
Public:
Stack );
Stackconst Stack& a_stack);
~Stack );
Void pushchar the_symbol);
Char pop );
Bool empty ) const;
Private:
StackFramePtr top;
};
(Multiple Choice)
4.9/5
(38)
Given a linked list using the code from the book), which of the following sets of statements would implement a function to return the last item in the list?
(Multiple Choice)
4.8/5
(45)
The constant NULL can be assigned only to pointers that point to numbers
(True/False)
5.0/5
(32)
If you want to make your linked list a class, you must also include the _____.
(Essay)
5.0/5
(34)
Given a linked list using the code from the book) and assuming there are at least two nodes in the list, which of the following sets of statements would implement a function to return and remove the last item in the list?
(Multiple Choice)
5.0/5
(41)
In a node type named MyNode, which of the following correctly declares a pointer to a node of that type?
(Multiple Choice)
4.7/5
(35)
Dynamically allocated memory that is no longer pointed to by any pointer variable causes a ______________.
(Short Answer)
4.8/5
(34)
If head is a NodePtr pointer variable, write the code to make head point to new node of type Node.
(Short Answer)
4.7/5
(39)
Data is removed from a stack in the _____ _______ it was entered.
(Multiple Choice)
4.7/5
(33)
The linked list is always the most efficient storage mechanism for storing many pieces of data.
(True/False)
4.9/5
(31)
Showing 1 - 20 of 64
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)