expand icon
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

Edition 7ISBN: 1285225562
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

Edition 7ISBN: 1285225562
Exercise 37

In every array, a subscript is out of bounds when it is _________.

a. negative

b. 0

c. 1

d. 999

Step-by-step solution
Verified
like image
like image

Step 1 of 4

An index is indicates the position of a certain item number in an array. It is also called subscript.

• Subscripts are not within in the range of acceptable for the array is called out of bounds.

• In most modern programming languages, such as C++, Java, and Visual Basic, the first array element is accessed using subscript 0. So, ‘0’ is not out of bounds subscript.

Hence, the option (b) is incorrect.


Step 2 of 4


Step 3 of 4


Step 4 of 4

close menu
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
cross icon