Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4,6 TrustPilot
logo-home
Examen

IT313 Intermediate Programming Midterm Exam Review 2025 (Qns & Ans)

Note
-
Vendu
-
Pages
32
Publié le
06-05-2025
Écrit en
2024/2025

IT313 Intermediate Programming Midterm Exam Review 2025 (Qns & Ans)IT313 Intermediate Programming Midterm Exam Review 2025 (Qns & Ans)IT313 Intermediate Programming Midterm Exam Review 2025 (Qns & Ans)

Établissement
Cours











Oups ! Impossible de charger votre document. Réessayez ou contactez le support.

École, étude et sujet

Établissement
Cours

Infos sur le Document

Publié le
6 mai 2025
Nombre de pages
32
Écrit en
2024/2025
Type
Examen
Contenu
Inconnu

Sujets

Aperçu du contenu

IT313

Intermediate Programming

3.0 Credits

Midterm Exam Review (Qns & Ans)

2025




©2025

, Multiple Choice Questions (10 Questions)

1. Question:
In a recursive function, which property designates that the
recursive call is the final operation executed, allowing the compiler
to optimize stack usage?
- a. Head recursion
- b. Tail recursion
- c. Nested recursion
- d. Indirect recursion

ANS:
b. Tail recursion

Rationale:
Tail recursion occurs when a function’s recursive call is its last
action. Many compilers can optimize such calls (tail-call
optimization) by reusing the current function’s stack frame, thus
reducing memory overhead.

2. Question:
Which container in C++ dynamically adjusts its size and manages
memory automatically?
- a. Static array
- b. std::vector
- c. C-style array
- d. std::list

ANS:
b. std::vector

Rationale:
The `std::vector` provides dynamic memory allocation,
automatically resizing as elements are added, making it ideal for
cases where the size isn’t known at compile time.

3. Question:
©2025

, Which balanced binary tree data structure ensures that the height
difference between left and right subtrees is at most one?
- a. Binary Search Tree (BST)
- b. AVL Tree
- c. B-Tree
- d. Red-Black Tree

ANS:
b. AVL Tree

Rationale:
An AVL tree maintains a strict balance condition (height
difference ≤ 1) at every node, offering faster lookup times in the
worst case than an unbalanced BST.

4. Question:
Which design pattern decouples the construction of a complex
object from its representation, making it possible to create different
types of the same object using the same construction process?
- a. Singleton
- b. Observer
- c. Builder
- d. Decorator

ANS:
c. Builder

Rationale:
The Builder pattern separates object construction from its
representation, allowing the same construction process to create
various representations. This is particularly useful in constructing
complex objects in an organized and modular way.

5. Question:
In Java concurrency, which interface, when combined with the
ExecutorService framework, enables asynchronous computation
and retrieval of a result?
- a. Runnable
©2025

, - b. Callable
- c. FutureTask
- d. Timer

ANS:
b. Callable

Rationale:
The `Callable` interface allows tasks to return a result and throw
exceptions. When executed by an `ExecutorService`, it returns a
`Future` object representing the result of the asynchronous
computation.

6. Question:
According to the Liskov Substitution Principle, which statement
best describes the requirement for subclass objects relative to their
base class?
- a. Subclass objects can alter base class behavior arbitrarily.
- b. Subclass objects must be substitutable for base class objects
without affecting program correctness.
- c. Subclass objects must mirror the implementation details of
base class methods.
- d. Subclass objects eliminate the need for overriding methods.

ANS:
b. Subclass objects must be substitutable for base class objects
without affecting program correctness.

Rationale:
The Liskov Substitution Principle requires that objects of a
superclass be replaceable with objects of a subclass without
altering the desirable properties of the program, ensuring
consistent behavior.

7. Question:
In modern C++ programming, which type of smart pointer
provides exclusive ownership semantics for a dynamically allocated
object?
©2025
16,35 €
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
emiliophd Walden University
S'abonner Vous devez être connecté afin de pouvoir suivre les étudiants ou les formations
Vendu
177
Membre depuis
2 année
Nombre de followers
46
Documents
4725
Dernière vente
4 jours de cela

Hi there! I\'m a former nursing student who loves to share my knowledge and experience with others. I have a collection of past study notes and papers for nursing and other programs that I sell at affordable prices. Whether you need help with anatomy, pharmacology, ethics, or anything else, I have something for you. My notes are clear, concise, and fun to read. They will make your learning easier and more enjoyable. Plus, you\'ll get to see some of my witty comments and jokes along the way. Trust me, you won\'t regret buying from me!

Lire la suite Lire moins
3,5

19 revues

5
6
4
5
3
4
2
0
1
4

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions