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

Programming Logic and Design, Chapter 6, Review Questions and Answers

Document preview thumbnail
Preview 1 out of 4 pages

Programming Logic and Design, Chapter 6, Review Questions and Answers

Content preview

Programming Logic and Design,
Chapter 6, Review Questions and
Answers

6. Suppose that you have declared a numeric array named numbers, and two of its
elements are numbers[1] and numbers[4]. You know that .

a. numbers[4] is larger than numbers[1]
b. the array has at least five elements
c. the array has been initialized
d. the two elements are three bytes apart in memory - ANSWER-b.

7. Suppose that you want to write a program that inputs customer data and displays
a summary of the number of customers who owe more than $1000 each, in each of
12 sales regions. Customer data variables include name, zipCode, balanceDue, and
regionNumber. At some point during record processing, you would add to an array
element whose subscript would be represented by .

a. name
b. zipCode
c. balanceDue
d. regionNumber - ANSWER-d.

8. A program contains a seven-element array that holds the names of the days of the
week. At the start of the program, you display the day names using a subscript
named dayNum. You display the same array values again at the end of the program,
where you as a subscript to the array.

a. must use dayNum
b. can use dayNum, but can also use another variable
c. must not use dayNum
d. must use a numeric constant instead of a variable - ANSWER-b.

9. Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0.
Which of the following is an allowed operation?

qa. values[2] = 17
b. input values[0]
c. values[3] = values[0] + 10
d. all of the above - ANSWER-d.

10. Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0.
Which of the following is an allowed operation?

a. values[4] = 80

Document information

Uploaded on
March 22, 2025
Number of pages
4
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