Question: C++ Problem 4) Run the Code for the Array out of bound error example below. Explain what you are looking at when you go out
C++
Problem 4) Run the Code for the Array out of bound error example below. Explain what you are looking at when you go out of bounds. ( look up on internet ) int ages[5] = {0};// You use 0 to 10, when you mean 0 to 3. for ( int i = 0 ; i <= 10 ; i++ ) { cout << "ages[" << i << "]: " << ages[i] << endl; } What types of problems could you cause if your code writes over those values outside the array ? What types of problems could you cause if you read/use those values in your calculations ? Use filename: Week13YourNameProg4BoundsError
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
