Exam 13: Pointers and Linked Lists

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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:
Verified

nullptr

There is no need for error checking when pushing a stack.

Free
(True/False)
4.8/5
(39)
Correct Answer:
Verified

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:
Verified

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)

The arrow operator ->) specifies

(Multiple Choice)
4.9/5
(37)

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)

To add an item to a stack, we call the ______ function

(Multiple Choice)
4.9/5
(31)

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)

A stack is a specialized type of list

(True/False)
4.8/5
(44)

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)

There is no need for error checking when popping a stack.

(True/False)
4.8/5
(39)

A queue is first-in-first-out data structure.

(True/False)
4.7/5
(39)

The number of possible nodes in a linked list is __________

(Short Answer)
4.9/5
(34)

Data is removed from a stack in the _____ _______ it was entered.

(Multiple Choice)
4.7/5
(33)

Data is inserted into a queue at the back.

(True/False)
4.8/5
(39)

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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)