Position number contained within a square bracket i.e array[5] is known as.

Question

Position number contained within a square bracket i.e array[5] is known as:

a) elements of array                                               b) postscript

c) subscript                                                            d) None of these

Summary

The next question is based on the various components of an array declaration. When an array is declared, the size and, on occasion, the elements are also supplied square bracket.

Explanation

Correct option: c) Subscript

The size of the array is defined by the subscript in the array declaration. It’s mentioned in square brackets next to the array’s name:

Array declaration is like:

Array name

Elements of array

int Array[ 5] = { 1,2,3,4,5};

↓               ↓

datatype  Subscript

of the array

elements

 

 

Also read, For these situations, just design the h files you need to implement the classes you’d need.

 

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *