1. What values are displayed when you print the myList array beforeit has been i
ID: 3611387 • Letter: 1
Question
1.
What values are displayed when you print the myList array beforeit has been initialized? Why is this the case?
2.
What happens in your program when you attempt to access an arrayelement with a subscript that is greater than the size of thearray?
3.
A single array can contain many different types of data. True orFalse? Explain your answer
4.
What advantage is there to using a declared constant torepresent the size of an array in a program?
5.
Write a c++ statement that will declare a 100 element array thatcan hold employee wage rates.
6.
Write a c++ statement that will declare a 500 element array thatcan hold names of students taking a class.
Explanation / Answer
1.
What values are displayed when you print the myList array beforeit has been initialized? Why is this the case?
2.
What happens in your program when you attempt to access an arrayelement with a subscript that is greater than the size of thearray? you destroy a value in memoryyou shouldn't be going near
3.
A single array can contain many different types of data. True orFalse? Explain your answer False, An array is many locationsof related, same type elements. ex: 50 names, 60grades...
4.
What advantage is there to using a declared constant torepresent the size of an array in a program?
that constant can be used throughout theprogram, while referenceing the array, and if you want to changethe size of the array you just have to change the constant, and notworry about finding all the number references throughout theprogram
5.
Write a c++ statement that will declare a 100 element array thatcan hold employee wage rates.
double wages[100];
6.
Write a c++ statement that will declare a 500 element array thatcan hold names of students taking a class.
string names[500];
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.