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 28

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

a. 10

b. 11

c. 12

d. 13

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.

• In most modern programming languages, such as C++, Java, and Visual Basic, the first array element is accessed using subscript 0 and second array element is accessed using subscript 1, etc.

• Subscripts are always a sequence of integers in any array.

• For example, 11-element array uses subscripts 0 through 10. Here, the highest subscript is 10.

Hence, the option (a) 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