Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 64 pages
Exam (elaborations)

CS201 – Data Structures and Algorithms – Final Exam (Solved Questions & Answers)

Document preview thumbnail
Preview 4 out of 64 pages

CS201 – Data Structures and Algorithms – Final Exam (Solved Questions & Answers) 1. return by value - ANSWER When the return statement is executed, the function exits immediately, and the return value is copied from the function back to the caller. This process is called ___________. 2. argument - ANSWER a value that is passed from the caller to the function when a function call is made. 3. pass by value - ANSWER When a function is called, all of the parameters of the function are created as variables, and the value of each of the arguments is copied into the matching parameter (using copy initialization). This process is called _______ 4. Container - ANSWER It makes the collections of objects manageable. 5. Elements - ANSWER Container is a class that provides data storage for a collection of unnamed objects called _______. 6. Array - ANSWER It is a linear and homogeneous data structure that collects elements of the same data type and stores them in a contiguous and adjacent memory location. 1. One dimensional arrays 2. Two dimensional arrays 2. Multi-dimensional arrays - ANSWER Array can be classified as: 7. One-dimensional arrays - ANSWER it requires only one subscript to specify the number of elements in an array.

Content preview

CS201 – Data Structures and Algorithms
– Final Exam (Solved Questions &
Answers)

1. return by value - ANSWER ✔ When the return
statement is executed, the function exits immediately,
and the return value is copied from the function back to
the caller. This process is called ___________.


2. argument - ANSWER ✔ a value that is passed from the
caller to the function when a function call is made.


3. pass by value - ANSWER ✔ When a function is called,
all of the parameters of the function are created as
variables, and the value of each of the arguments is
copied into the matching parameter (using copy
initialization). This process is called _______


4. Container - ANSWER ✔ It makes the collections of
objects manageable.

,5. Elements - ANSWER ✔ Container is a class that
provides data storage for a collection of unnamed
objects called _______.


6. Array - ANSWER ✔ It is a linear and homogeneous
data structure that collects elements of the same data
type and stores them in a contiguous and adjacent
memory location.


1. One dimensional arrays 2. Two dimensional arrays
2. Multi-dimensional arrays - ANSWER ✔ Array can be
classified as:


7. One-dimensional arrays - ANSWER ✔ it requires only
one subscript to specify the number of elements in an
array.

,8. Multi-dimensional arrays - ANSWER ✔ it requires
more than one subscript to specify the number of
elements in an array.


9. Two dimensional arrays - ANSWER ✔ It is organized
in the form of a matrix which can be represented as a
collections of rows and columns.


1. Fixed-size
2. Elements are stored in contiguous memory location
3. insertion and deletion of elements can be problematic -
ANSWER ✔ What are the limitations of an array?


1. storing list of elements belonging to the same data type
2. auxiliary storage for other data structures
3. matrices
4. underlying data structure for implementing stacks and
queues - ANSWER ✔ What are the applications of an
array?


1. C-style array

, 2. std::array
3. std::vector - ANSWER ✔ What are the three primary
array types?


10. c-style array - ANSWER ✔ It is a fixed-size, zero-
based indexed collection of elements of the same data
type, which inherited from C language.


11. std::array - ANSWER ✔ It is a fixed-size, static array
container introduced in C++11, providing a safer and
more feature-rich alternative to traditional C-style
arrays.


12. std::vector - ANSWER ✔ It makes arrays safer and
easier to use in c++. Most flexible of the three types.
Variable-size can be changed during runtime.


13. Structure - ANSWER ✔ It is a program-defined data
type that allows user to bundle multiple variables
together into a single type.

Document information

Uploaded on
September 7, 2025
Number of pages
64
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

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

Sold
0
Followers
0
Items
22
Last sold
-



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