• 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 4 out of 85 pages
Exam (elaborations)

Programming Fundamentals Practice Exam Questions And Correct Answers (Verified Answers) Plus Rationales 2026 Q&A | Instant Download Pdf

Document preview thumbnail
Preview 4 out of 85 pages

Programming Fundamentals Practice Exam Questions And Correct Answers (Verified Answers) Plus Rationales 2026 Q&A | Instant Download Pdf

Content preview

Programming Fundamentals Practice
Exam Questions And Correct Answers
(Verified Answers) Plus Rationales
2026 Q&A | Instant Download Pdf
1.
Which of the following best describes an algorithm?
A. A programming language
B. A hardware component
C. A step-by-step procedure for solving a problem
D. A type of computer memory
Answer: A step-by-step procedure for solving a problem
Rationale: An algorithm is a finite, ordered sequence of instructions
designed to accomplish a specific task or solve a problem. Algorithms
can be expressed using natural language, pseudocode, flowcharts, or
programming code.
2.
What is a variable in programming?
A. A permanent hardware device
B. A named storage location whose value can change
C. A program error
D. A programming language
Answer: A named storage location whose value can change

,Rationale: A variable provides a named location for storing data
during program execution. Its stored value may change as the
program runs, depending on the programming language and how the
variable is used.
3.
Which data type is normally used to represent whole numbers?
A. Boolean
B. String
C. Character
D. Integer
Answer: Integer
Rationale: An integer data type represents whole numbers such as -10,
0, and 25. Integers generally do not contain a fractional or decimal
component.
4.
Which data type is most appropriate for storing true or false values?
A. Integer
B. String
C. Boolean
D. Floating-point
Answer: Boolean
Rationale: Boolean values represent logical states and normally have
two possible values: true and false. They are commonly used in
conditions, comparisons, and decision-making statements.
5.
What does a compiler generally do?

,A. Physically repairs computer hardware
B. Translates source code into a form that can be executed
C. Deletes unused files
D. Connects a computer to the Internet
Answer: Translates source code into a form that can be executed
Rationale: A compiler translates source code written in a programming
language into another representation, commonly machine code or an
intermediate form. Compilation may also identify syntax and semantic
errors.
6.
What is the primary purpose of an interpreter?
A. To manufacture processors
B. To store files permanently
C. To execute program instructions through interpretation
D. To increase monitor resolution
Answer: To execute program instructions through interpretation
Rationale: An interpreter processes program instructions during
execution, often translating or evaluating them as the program runs.
This differs from traditional compilation, where source code is
translated before execution.
7.
Which symbol commonly represents assignment in many programming
languages?
A. ==
B. !=

, C. >=
D. =
Answer: =
Rationale: In many languages, the single equals sign assigns a value to
a variable. The double equals sign is commonly used for equality
comparison, although exact syntax varies between languages.
8.
What is the purpose of an if statement?
A. To repeat code indefinitely
B. To define a variable
C. To execute code conditionally
D. To terminate the operating system
Answer: To execute code conditionally
Rationale: An if statement evaluates a condition and executes a
particular block of code when that condition is satisfied. It is one of
the fundamental mechanisms for controlling program flow.
9.
Which control structure is primarily used to repeat instructions?
A. Selection
B. Declaration
C. Iteration
D. Compilation
Answer: Iteration
Rationale: Iteration means repeatedly executing a block of
instructions. Loops such as for, while, and do-while are common
examples of iterative control structures.

Document information

Uploaded on
August 17, 2026
Number of pages
85
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$21.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.
masterystudyhub
3.0
(4)
Sold
48
Followers
3
Items
12139
Last sold
19 hours 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