Exam 6: Arrays
Exam 1: An Overview of Computers and Programming60 Questions
Exam 2: Elements of High-Quality Programs59 Questions
Exam 3: Understanding Structure60 Questions
Exam 4: Making Decisions60 Questions
Exam 5: Looping59 Questions
Exam 6: Arrays60 Questions
Exam 7: File Handling and Applications59 Questions
Exam 8: Advanced Data Handling Concepts60 Questions
Exam 9: Advanced Modularization Techniques60 Questions
Exam 10: Object-Oriented Programming60 Questions
Exam 11: More Object-Oriented Programming Concepts60 Questions
Exam 12: Event-Driven Gui Programming, Multithreading, and Animation60 Questions
Select questions type
Match each term with a statement below.
-Starts searching through a list from one end to the other
Free
(Multiple Choice)
4.8/5
(74)
Correct Answer:
A
A(n)____________________ is a variable set to indicate whether some event has occurred.
Free
(Short Answer)
4.8/5
(97)
Correct Answer:
flag
How do you reference the elements in an array?
Free
(Essay)
4.8/5
(84)
Correct Answer:
Each array element is differentiated from the others with a unique subscript,also called an index,which is a number that indicates the position of a particular item within an array.All array elements have the same group name,but each individual element also has a unique subscript indicating how far away it is from the first element.For example,a five-element array uses subscripts 0 through 4,and a ten-element array uses subscripts 0 through 9.In all languages,subscript values must be sequential integers (whole numbers).
To use an array element,you place its subscript within square brackets or parentheses (depending on the programming language)after the group name.
When you search through a list from one end to the other,you are performing a ____.
(Multiple Choice)
4.8/5
(82)
All array elements have the same ____________________ name,but each individual element also has a unique subscript indicating how far away it is from the first element.
(Short Answer)
4.8/5
(62)
A subscript,also called a(n)____________________,is a number that indicates the position of a particular item within an array.
(Short Answer)
4.9/5
(71)
Suppose that you have declared a numeric array named numbers,and two of its elements are numbers[1] and numbers[5].You know that ____.
(Multiple Choice)
5.0/5
(84)
Describe an array and provide an example of a real-life equivalent to an array.
(Essay)
4.7/5
(87)
Many newer programming languages such as C++,Java,and C# use the square bracket notation for arrays.
(True/False)
4.9/5
(79)
The number of bytes in an array is always a multiple of the number of ____ in an array.
(Multiple Choice)
4.8/5
(71)
Match each term with a statement below.
-A variable that you set to indicate whether some event has occurred
(Multiple Choice)
4.9/5
(81)
Match each term with a statement below.
-In this type of array,each element in one array is associated with the element in the same relative position in the other array
(Multiple Choice)
4.9/5
(86)
What is an advantage of using an array to match a value in a range of values?
(Essay)
4.9/5
(82)
If you declare a variable to be Boolean,you can set its value to ____.
(Multiple Choice)
4.8/5
(82)
Consider a mail-order business in which customers get a discount based on the quantity they order.In writing a program to compute the discount based on a customer's order quantity,why is it not a good idea to construct an array with as many elements as a customer might want to order,and store the appropriate discount associated with each number?
(Essay)
4.9/5
(81)
Besides making your code easier to modify,using a ____ makes the code easier to understand.
(Multiple Choice)
4.8/5
(77)
Showing 1 - 20 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)