• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 5 pages
Exam (elaborations)

Eecs 280 Final T/F Practice Questions & Answers

Document preview thumbnail
Preview 2 out of 5 pages

EECS 280 FINAL T/F PRACTICE QUESTIONS & ANSWERS

Content preview

EECS 280 FINAL T/F PRACTICE QUESTIONS &
ANSWERS

Assuming a valid BST node *, the expression *node never results in error - Answer -
false (an empty tree is a valid BST, so node could be a nullptr)

If you have a container of pointers to dynamically allocated objects, the container's
destructor should ensure they are cleaned up - Answer -false (the destructor only
cleans up memory allocated by the container itself)

Deleting a dynamically allocated array will be done with both delete[] as well as a for
loop of delete arr[i] - Answer -false (the loop-version results in undefined behavior)

Destructors are only called when using the delete or delete[] keyword - Answer -false
(memory that is local goes out of scope)

Dangling pointer means you have set a pointer to nullptr after deleting what it was
pointing to - Answer -false (it's exactly the opposite: Dangling pointer still points to the
deleted object)

An overloaded == operator is REQUIRED for classes that manage dynamic memory
(eg. to avoid shallow copies) - Answer -false (the only requirements are from the Big 3 -
ctr, dtr, overloaded= operator. operator== is not one of them)

Tree recursive functions can be tail recursive - Answer -false (goes against definition of
tree recursive - multiple recursive calls from at least one function call - in tail recursion,
no work done after recursive call)

A class that has a pointer as a member variable should implement the Big Three -
Answer -false (only classes with pointers to dynamically allocated memory need the Big
Three)

Any recursive solution written for a binary search tree will always be tree recursive -
Answer -false

When the new keyword is used to create a dynamic object, the new operation evaluates
to the value of that object - Answer -false

In C++, static member functions have access to the this pointer - Answer -false

The private members of a class can never be accessed by any other class - Answer -
false (friend classes)

, A container of pointers is responsible for deleting memory associated with those
pointers - Answer -false (only if dynamically allocated??)

Imposter syndrome is a condition in which someone believes that they know less than
other people in a similar situation - Answer -true

A function that is linear recursive can also be tail recursive - Answer -true (linear
recursion - at most one recursive call each time the function is called, tail recursion -
linear recursion and all recursive calls are tail calls)

An uncaught exception will cause the program to terminate - Answer -true

Printing all the elements in an array has linear O(n) time complexity - Answer -true

Finding the element at index i in an array has constant O(1) time complexity - Answer -
true

Assuming a data structure uses an array to store an ordered sequence of elements and
keeps track of the number of elements, removing the last element from the sequence
has constant O(1) time complexity - Answer -true

Assuming a data structure uses an array to store an ordered sequence of elements and
keeps track of the number of elements, removing an element from the middle of the
sequence has constant O(1) time complexity - Answer -false

Given a pointer to an element in the middle of an array, removing that element from the
array has constant O(1) time complexity - Answer -false

A set based on a sorted array has better time complexity for a contains() operation, but
worse time complexity for insert() and remove() when compared to a set based on an
unsorted array - Answer -false (not worse, but same)

A set based on a sorted array has better time complexity for a contains() operation, but
the same time complexity for insert() and remove() when compared to a set based on
an unsorted array - Answer -true

An instance of a container class with a template parameter for its element type may
contain several different kinds of objects at runtime - Answer -false

An instance of a container class with a template parameter for its element type must
choose the type of element it contains at compile_time, and this cannot be changed at
runtime - Answer -true

Representation invariants are used to specify the C++ type of an ADT's member
variables - Answer -false

Document information

Uploaded on
October 5, 2025
Number of pages
5
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GEEKA
3.8
(373)
Sold
2203
Followers
1450
Items
62205
Last sold
3 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions