answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What is typically the last subscript in an array?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the lowest subscript of an array in c plus plus?

The lowest subscript of an array in C, or C++ is 0.


If structure is arraythen an individual array element can be accessed by writing a variable?

A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.


Why should indexes be used instead of subscripts to identify array elements?

You cannot uses indices instead of subscripts. The subscript operator [] requires an index in order to determine the subscript. Even if you don't use the subscript operator you still need an index to determine the offset of the subscript. Indeed, the only time you do not need an index is when traversing the array using a roving pointer, which is arguably more efficient than using a subscript to traverse an array since subscripts use multiplication instead of the much simpler increment/decrement operation.


True or false when accessing an element of an array such as numbers are the square braces called a subscript?

False. The square braces are the subscript operator. The subscript is the operand, the zero-based offset index that is passed to the operator.


What is the difference between subscript and subscripted variable in c plus plus?

Subscripts are used to identify the elements in an array, where the first element has subscript 0. Thus an array of n elements has subscripts in the range 0 to n-1. Each element may itself be an array, thus allowing multi-dimensional arrays. The subscript may be a constant or a variable. However, when declaring a static array, the subscript must be a constant. Constants include literal constants as well as named constants. A subscripted variable is simply an array or a datatype that can be divided into an array. For instance, a 32-bit int can be treated just as if it were an array of two 16-bit shorts or four 1-byte chars. Thus in the 32-bit int array, int i[10], i is a subscripted variable where i[0] is the first integer and i[9] is the last. If we then say char*c=&i, c would allow us to treat i as if it were a subscripted variable with 40 char elements (c[0] to c[39]).

Related questions

What is the lowest subscript of an array in c plus plus?

The lowest subscript of an array in C, or C++ is 0.


If structure is arraythen an individual array element can be accessed by writing a variable?

A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.A structure is not an array. Individual array elements are accessed through a number, called a "subscript". This subscript can be a constant, or a variable, or any expression that can be evaluated to give an integer.


What is the relationship between the value of the subscript and the value of the array element in c?

You can access the array-element via index (or subscript), but it is not possible the other way around.


What happens if a subscript value is negative or higher than the number of elements in an array?

It cannot be part of the array.


Every element in an array is assigned an unique number known as?

subscript


Why should indexes be used instead of subscripts to identify array elements?

You cannot uses indices instead of subscripts. The subscript operator [] requires an index in order to determine the subscript. Even if you don't use the subscript operator you still need an index to determine the offset of the subscript. Indeed, the only time you do not need an index is when traversing the array using a roving pointer, which is arguably more efficient than using a subscript to traverse an array since subscripts use multiplication instead of the much simpler increment/decrement operation.


True or false when accessing an element of an array such as numbers are the square braces called a subscript?

False. The square braces are the subscript operator. The subscript is the operand, the zero-based offset index that is passed to the operator.


What is the difference between subscript and subscripted variable in c plus plus?

Subscripts are used to identify the elements in an array, where the first element has subscript 0. Thus an array of n elements has subscripts in the range 0 to n-1. Each element may itself be an array, thus allowing multi-dimensional arrays. The subscript may be a constant or a variable. However, when declaring a static array, the subscript must be a constant. Constants include literal constants as well as named constants. A subscripted variable is simply an array or a datatype that can be divided into an array. For instance, a 32-bit int can be treated just as if it were an array of two 16-bit shorts or four 1-byte chars. Thus in the 32-bit int array, int i[10], i is a subscripted variable where i[0] is the first integer and i[9] is the last. If we then say char*c=&i, c would allow us to treat i as if it were a subscripted variable with 40 char elements (c[0] to c[39]).


If an array has a 100 elements what is the allowable range of subscripts?

Since arrays in C are zero based, the allowed subscript range is 0 - 99 (gives 100 values). Always remember to subtract 1 from the high range (in this case 100) to get the last subscript maximum value.


What is array What is difference between array and simple variable?

An array stores several values - for example, several numbers - using a single variable name. The programmer can access the individual values with a subscript, for example, myArray[0], myArray[5]. The subscript can also be a variable, for example, myArray[i], making it easy to write a loop that processes all the elements of an array, or some of them, one after another.


What would the valid subscript values be in a four element array of doubles?

since the array is four elements and array subscripts start at zero, the valid ones would be 0, 1, 2, 3


How do you find greatest no using array in java?

Assume that the greatest number is the first element (subscript zero). Compare with each element in the array (starting with subscript one), and every time you find one that is greater than the greatest so far, set your variable "greatest" to this number.