cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Help with array question?
Help with array question?
Mar 28, 2013 at 1:31am UTC
closed account (
EApGNwbp
)
What is the index of the first element in the array declared below?
const int SIZE = 3;
int nums2[SIZE] = {1, 2, 3};
Mar 28, 2013 at 1:32am UTC
Yanson
(885)
The first index of an array is always 0.
Mar 28, 2013 at 1:36am UTC
closed account (
EApGNwbp
)
@yanson
and this question what would it be?
What is the index of the last element in the array declared below?
const int SIZE = 3;
int nums2[SIZE] = {1, 2, 3};
Mar 28, 2013 at 1:39am UTC
Zhuge
(4664)
You should be able to figure that out from the information you've been given. The first index is 0 (the first element), and there are 3 elements. So what is the last index?
Topic archived. No new replies allowed.