answersLogoWhite

0


Best Answer

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

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the relationship between the value of the subscript and the value of the array element in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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

subscript


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.


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.


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.


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

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


What does it mean for a subscript to be out-of -bounds?

This is a type of error that usually occurs in computer programs. An array is defined in which the elements of the array are identified by one or more subscripts. Suppose you have an array which is declared to be of dimension 23. Then if the program tries to access element 26 in that array, it cannot because there is no element of the array in that position. That is when you will get this error message.


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


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]).


How do you use subscripts with an array?

An array is a list of several related elements. You use the subscript to specify which element you want to access. For example, in Java you might have an array called myArray, with 10 elements (numbered from 0 to 9); myArray[3] would access the fourth element in the array. A variable may be used instead of a constant.


Insert an element after an element in an array?

To begin, obtain the element to be added, such as x Then, say pos, get the position where this element will be put. Then shift the array items one position ahead, then do the same for all the other elements next to pos. Because the location pos is now empty, insert the element x there. To learn more about data science please visit- Learnbay.co


What is the relationship between a stack and an array?

There is no inherent relationship between the two. It's possible to implement a stack using an array to store date, but that's about it.


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.