Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Expert Solution & Answer
Book Icon
Chapter 8, Problem 1MC
Program Description Answer

In an array, size declarator is used to specify the number of elements in an array.

Hence, the correct answer is option “B”.

Expert Solution & Answer
Check Mark

Explanation of Solution

Array size declarator:

  • The number that is given inside the square brackets at the time of array declaration is called as array size declarator.
  • The value should not be in negative.
  • In order to avoid changing of size inside the source code, the programmers desires to use named constants as array size declarator.

Example for array size declarator:

int arrayName[10];

In the above example:

int – It is the data type

arrayName – Name of the array

10 – Size of the array

Explanation for incorrect options:

Subscript:

Each and every element in an array is assigned to a special value called as subscripts or indexes.

Hence, the option “A” is wrong.

Array Name:

Array name is not used to specify the number of elements in an array rather it mentions the name of the array.

Hence, the option “C” is wrong.

Initialization value:

It is nothing but the data that are given inside the array.

Hence, the option “D” is wrong.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Question:   Get a series of numbers from the user. Let the user determine how many numbers to enter. Set an upper and lower limit for the number that will be array size. If the user enters the number as outside that range, ask him to enter the number again, with an error message on the screen until the correct number is entered. Calculate the largest and smallest elements, sum and average of the array created with the numbers entered by the user, using functions. Print the results obtained on the screen. Also get another input from the user. Use a function to calculate how many characters this input has, how many characters are letters, how many characters are numbers and how many characters are other characters. Print the results on the screen.
Determine whether the following array declarations are valid. If a declaration is valid, write VALID. If it is invalid, you can make assumptions and write a correct declaration. int size; double[] list = new double[size];
What is the value of a[5] if an array is initialized as follows: int a[10]={15};     0     5     10     15

Chapter 8 Solutions

Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)

Ch. 8.2 - Prob. 8.11CPCh. 8.2 - What does the loop do in the sequential search...Ch. 8.2 - Prob. 8.13CPCh. 8.2 - How do you look for a partial string match when...Ch. 8.3 - Prob. 8.15CPCh. 8.3 - Prob. 8.16CPCh. 8.3 - Describe the algorithm for finding the highest...Ch. 8.3 - Prob. 8.18CPCh. 8.3 - Prob. 8.19CPCh. 8.4 - Prob. 8.20CPCh. 8.4 - Prob. 8.21CPCh. 8.5 - Prob. 8.22CPCh. 8.5 - Write a pseudocode statement that assigns the...Ch. 8.5 - Prob. 8.24CPCh. 8.5 - Prob. 8.25CPCh. 8.6 - Prob. 8.26CPCh. 8 - Prob. 1MCCh. 8 - Prob. 2MCCh. 8 - This is an individual storage location in an...Ch. 8 - Prob. 4MCCh. 8 - Prob. 5MCCh. 8 - Prob. 6MCCh. 8 - Prob. 7MCCh. 8 - Prob. 8MCCh. 8 - Prob. 9MCCh. 8 - Prob. 10MCCh. 8 - Prob. 1TFCh. 8 - Prob. 2TFCh. 8 - Prob. 3TFCh. 8 - Prob. 4TFCh. 8 - Prob. 5TFCh. 8 - Prob. 1SACh. 8 - Prob. 2SACh. 8 - Look at the following pseudocode: Constant Integer...Ch. 8 - Prob. 4SACh. 8 - Prob. 5SACh. 8 - Prob. 1AWCh. 8 - Prob. 2AWCh. 8 - Prob. 3AWCh. 8 - Prob. 4AWCh. 8 - Prob. 5AWCh. 8 - Prob. 6AWCh. 8 - Assume the following declarations appear in a...Ch. 8 - Design an algorithm for a function that accepts an...Ch. 8 - Write a pseudocode algorithm that uses the For...Ch. 8 - Total Sales Design a program that asks the user to...Ch. 8 - Lottery Number Generator Design a program that...Ch. 8 - Prob. 3PECh. 8 - Prob. 4PECh. 8 - Charge Account Validation Design a program that...Ch. 8 - Days of Each Month Design a program that displays...Ch. 8 - Phone Number Lookup Design a program that has two...Ch. 8 - Payroll Design a program that uses the following...Ch. 8 - Drives License Exam The local drivers license...Ch. 8 - Saddle Points Design a program that has a...Ch. 8 - Tic-Tac-Toe Game Design a program that allows two...Ch. 8 - Lo Shu Magic Square The Lo Shu Magic Square is a...
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning