What is Numeric Array?
Numeric arrays allow us to store numerous values of the same data type in a single variable rather than creating multiple variables for each value. These values can then be accessed using an index, which is always a number in numeric arrays.
How to declare and initialize an array?
There are two ways to create an array. Let’s take a look at both these ways in the Following example:
1. Accessing the elements
You must know the index value of an array’s items in order to access them.
Example:-
2. Length of an array
The in-built function count
can be used to count the length of an array, or the number of elements in the array.
Example:-
- Top 10 DevOps Trainers in the world - October 7, 2023
- What is Cookies and Why it is Used? - May 24, 2023
- TOP trends of transitions in TikTok - May 10, 2023