• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 5 páginas
Examen

EECS 280 Final Exam Fall '18 - Term Definitions Questions and Graded Answers.

Document preview thumbnail
Vista previa 2 fuera de 5 páginas

EECS 280 Final Exam Fall '18 - Term Definitions Questions and Graded Answers.

Vista previa del contenido

EECS 280 Final Exam Fall '18 - Term
Definitions Questions and Graded
Answers.
The "Rule of (the Big) Three" - If you need to declare EITHER a copy constructor, assignment
operator, or destructor, then you probably need to explicitly declare ALL three.
//
Alternately: if your program has dynamically-allocated memory, you probably need to declare
all three of these.


"friend" classes - If B is a class declared inside A, declaring A as a friend class of B means A can
see B's private variables.


//Note: Friendship DOESN'T go both ways! A can't say "B is my friend" if B is inside A.


Deep copy - Copies the actual object a pointer points to, not just the pointer itself, for a new
instance of a class.


Shallow copy - A copy that replicates only a pointer-to-object, and not the object itself, for a new
instance of a class.


Destructor - A member function that deletes the dynamically-allocated memory associated with
an object instance at the end of that object's lifetime (called automatically).


Virtual destructor - A destructor that ensures the proper corresponding destruction takes place in
derived classes that may contain member variables that are different from those of the base class.

, Copy constructor - A member function of an object that takes in a current object instance,
allocates memory for a new object instance, and gives that new instance the exact same member
variables as the old instance by initializing them.


Overloaded assignment operator - Combines the functionality of destructors and copy
constructors.


*this - A "hidden" member variable of every class that points to the current/working instance of
the class in your program.


3 types of recursion - Linear recursion, tail recursion, and tree recursion


Tail recursion/tail-recursive function - A recursive function in which the recursive statement is
the last statement that occurs in the entire recursive function. Differs from linear recursion
because the recursive call MUST be last.


Linear recursion/linear-recursive function - A recursive function that only makes one recursive
call in its entire implementation. Differs from tail recursion because this call doesn't need to be
the last statement.


Tree recursion/tree-recursive function - A recursive function that makes multiple recursive calls
throughout its body.


Dangling pointer - A pointer that points to a memory location which no longer contains the
object it originally pointed to; a pointer that points to unallocated memory.


Memory leak - When a piece of dynamically-allocated memory is not properly de-allocated by
the programmer.


Consequences of memory leaks - May slow down the program, crash the program, or (at worst)
cause undefined behavior.

Información del documento

Subido en
4 de septiembre de 2025
Número de páginas
5
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$4.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
373
Última venta
-



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes