100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

CS113 Intro to Programming Midterm Exam Review 2025 (With Solns

Rating
-
Sold
-
Pages
32
Uploaded on
08-04-2025
Written in
2024/2025

CS113 Intro to Programming Midterm Exam Review 2025 (With SolnsCS113 Intro to Programming Midterm Exam Review 2025 (With SolnsCS113 Intro to Programming Midterm Exam Review 2025 (With Solns












Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
April 8, 2025
Number of pages
32
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

Subjects

Content preview

CS113 Introduction to Programming

Midterm Exam Review (Qns & Ans)

2025



1. Which programming paradigm emphasizes objects that
contain both data and methods?
A. Procedural programming
B. Functional programming
C. Object-oriented programming
D. Logic programming
ANS: C. Object-oriented programming
Rationale: Object-oriented programming organizes code into
objects, combining data and behavior, making it modular and
reusable.


2. What is the primary purpose of an algorithm in programming?
©2025

, A. To store data persistently
B. To serve as a blueprint for writing code
C. To provide a sequence of steps for solving problems
D. To display user interface elements
ANS: C. To provide a sequence of steps for solving problems
Rationale: Algorithms define structured procedures to achieve
specific outcomes efficiently.


3. Which of the following data types is typically used to store a
sequence of characters?
A. Integer
B. String
C. Boolean
D. Float
ANS: B. String
Rationale: Strings hold textual data represented as a sequence
of characters.


4. What is the output of the following Python code snippet:
`print(2 3)`?
A. 5
B. 6
©2025

, C. 8
D. 9
ANS: C. 8
Rationale: The ` ` operator represents exponentiation, and `2
3` calculates 2 raised to the power of 3.


5. What is the role of a compiler in programming?
A. Translates high-level code into machine code
B. Debugs runtime errors
C. Executes code line by line
D. Provides storage for variables
ANS: A. Translates high-level code into machine code
Rationale: Compilers convert programming languages into
executable machine code for hardware processing.


---


Fill-in-the-Blank Questions
6. ________ programming involves using functions that avoid
changing state and operate solely on inputs to produce outputs.
ANS: Functional

©2025

, Rationale: Functional programming relies on immutable data
and pure functions.


7. A loop that repeats indefinitely unless terminated by a specific
condition is called an ________ loop.
ANS: Infinite
Rationale: Infinite loops occur when the termination condition
is never met.


8. The process of finding and fixing errors in a program is
known as ________.
ANS: Debugging
Rationale: Debugging ensures the program functions correctly
by addressing runtime or syntax errors.


9. In programming, a ________ is a collection of related data
stored in a single variable and accessed using an index.
ANS: Array
Rationale: Arrays organize multiple items in a sequential and
indexed format.


10. The ________ operator is used to compare two values for
equality in most programming languages.

©2025

Get to know the seller

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.
ClementeO Walden University
View profile
Follow You need to be logged in order to follow users or courses
Sold
128
Member since
3 year
Number of followers
43
Documents
5013
Last sold
2 weeks ago

3.7

16 reviews

5
9
4
0
3
3
2
1
1
3

Recently viewed by you

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

Frequently asked questions