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

C173,D278 Study Questions WITH CORRECT ANSWERS,

Document preview thumbnail
Preview 2 out of 8 pages

C173,D278 Study Questions WITH CORRECT ANSWERS,

Content preview

C173/D278 Study Questions WITH |\ |\ |\ |\




CORRECT ANSWERS |\




What is the purpose of a variable?
|\ |\ |\ |\ |\ |\




a named item like x, used to hold a value.
|\ |\ |\ |\ |\ |\ |\ |\ |\




How do you save a value to a variable?
|\ |\ |\ |\ |\ |\ |\ |\




An assignment statement assigns a variable with a value. (x = 0)
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\




What is a programming expression?
|\ |\ |\ |\




A number, variable (x), or simple calculation (numApples + 1).
|\ |\ |\ |\ |\ |\ |\ |\ |\




What is an identifier?|\ |\ |\




A name created for a variable or a function.
|\ |\ |\ |\ |\ |\ |\ |\




What constitutes a valid identifier?
|\ |\ |\ |\




An identifier must start with a letter and be a sequence of letters,
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\



underscores, and digits. |\ |\




What is a literal? |\ |\ |\




any number, text, or other information that directly represents a value.
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\




What is an operator? |\ |\ |\




a symbol that performs a built-in calculation. (+, -, *, /)
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\




What precedence rules does programming use?
|\ |\ |\ |\ |\




PEMDAS

How does an integer differ from a float?
|\ |\ |\ |\ |\ |\ |\

, Integers are whole numbers and used for counted values.
|\ |\ |\ |\ |\ |\ |\ |\



Floats allow the decimal point to appear anywhere in the number and are
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\



used for values that are measured or fractions.
|\ |\ |\ |\ |\ |\ |\




What happens if you divide two integers?
|\ |\ |\ |\ |\ |\




you will get an integer or the answer will be cut short
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\




what happens if you divide an integer and float?
|\ |\ |\ |\ |\ |\ |\ |\




It returns a float
|\ |\ |\




What happens if you divide a nonzero floating point number by zero?
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\




In coral -infinity or infinity. Otherwise not a number.
|\ |\ |\ |\ |\ |\ |\ |\




How do you convert an item's type?
|\ |\ |\ |\ |\ |\




By using a type conversion.
|\ |\ |\ |\




What does the modulo operator do?
|\ |\ |\ |\ |\




evaluates to the remainder of the division of two integer operands.
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\




What is the difference in a variable and a constant?
|\ |\ |\ |\ |\ |\ |\ |\ |\




A variable can change while a constant is a value that always stays the same.
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\




How does an array work? |\ |\ |\ |\




It is a collection of data stored in an index together.
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\




What does index reference? |\ |\ |\




The location where values are stored in an array.
|\ |\ |\ |\ |\ |\ |\ |\




How does a branch differ from a loop?
|\ |\ |\ |\ |\ |\ |\




In a branch is only executed under a certain condition (true, false). A loop
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\



repeatedly executes as long as the loops decision expression evaluates to true
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\



( i < numVals.size).
|\ |\ |\ |\




How does an if-else branch work?
|\ |\ |\ |\ |\

Document information

Uploaded on
September 3, 2025
Number of pages
8
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$14.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.
EXAMSTUDYPLUG
4.5
(242)
Sold
385
Followers
107
Items
20955
Last sold
3 weeks 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