why does "Array out of bounds exception" error occur when tryin to complie
rizillion 0 Newbie Poster
Recommended Answers
Jump to PostCan you please post the code you're trying to compile?
Jump to PostExample I:
int array[5]; int el; el = array[5]; // out of bound el = array[6]; // out of bound
Example II:
int array[5]; int *p, el; p = array; el = *(p+5); // out of bound el = p[7]; // out of bound
Jump to Post> it will be a question in my C++ exam which will be held next week.
How do you know this?What's next, multi-choice papers with the correct answer displayed in the bold font?
<old-fogey-mode>
All the exams I ever did were seen for the first time in …
All 10 Replies
tux4life 2,072 Postaholic
rizillion 0 Newbie Poster
tux4life 2,072 Postaholic
Salem 5,265 Posting Sage
rizillion 0 Newbie Poster
tux4life 2,072 Postaholic
rizillion 0 Newbie Poster
tux4life 2,072 Postaholic
rizillion 0 Newbie Poster
tux4life 2,072 Postaholic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.