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

Programming Design and Logic Chapter 6 and 7 Questions and Answers

Document preview thumbnail
Preview 1 out of 3 pages

Programming Design and Logic Chapter 6 and 7 Questions and Answers

Content preview

Programming Design and Logic
Chapter 6 and 7 Questions and
Answers
Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0.
Which of the following is an allowed operation? - ANSWER-values[4] = 80
values[2] = values[4] - values[0]
output values[3]

all of the above

Filling an array with values during a program's execution is known as ___________
the array. - ANSWER-populating

A ___________ is a variable that can be set to indicate whether some event has
occurred. - ANSWER-flag

What do you call two arrays in which each element in one array is associated with
the element in the same relative position in the other array? - ANSWER-parallel
arrays

In most modern programming languages, the highest subscript you should use with
a 12-element array is __________. - ANSWER-11

Parallel arrays _____________. - ANSWER-frequently have an indirect relationship

Each element in a seven-element array can hold value(s) - ANSWER-one

Suppose that an instructor assigns different letter grades based on points earned on
a 10-point quiz, and that all scores have been verified to be between 0 and 10
inclusive. Also suppose that four possible letter grades can be assigned and that 9 or
10 points is an A, 7 or 8 points is a B, 6 points is a C, and 5 or fewer points is an F.
To assign letter grades, the most efficient numeric array containing point values
would contain __________ elements. - ANSWER-three

When you use a subscript value that is negative or higher than the number of
elements in an array. - ANSWER-the resulting action depends on the programming
language used

In every array, a subscript is out of bounds when it is ____________. - ANSWER-
negative

You can access every element of an array using a _________. - ANSWER-while
loop
for loop

Document information

Uploaded on
March 22, 2025
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.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.
lectknancy
3.8
(82)
Sold
342
Followers
27
Items
26160
Last sold
3 days 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