subject
Computers and Technology, 06.04.2021 03:30 34df

At the beginning of the semester, we studied partially filled arrays. This is when the number of elements stored may be less than the maximum number of elements allowed. There are two different ways to keep track of partially filled arrays: 1) use a variable for the numberElements or 2) use a sentinel (terminating} value at the end of elements (remember c-strings?). In the code below, please fill in the details for reading the values into the an array that uses a sentinel value of -1. Complete the showArray function as well. #include
using namespace std;
void showArray(int array[]);
// ToDo: Code showArray function with one array parameter
int main()
{
const int MAX_SIZE=16;
int array[MAX_SIZE]; // store positive values, using -1 to end the values.
cout <<"Enter up to " << MAX_SIZE-1 << " positive whole numbers, use -1 to stop\n";
//To do: Read the int values and save them in the static array variable.
// When the user enters -1 or the array has no more room, leave the loop..
//To do: store -1 at the end of elements in the array
// Show array function
showArray(array);
return 0;
}
// To do: print out for the array
void showArray(int array[])
{
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
The computers in the sales department did not have enough data storage capacity to contain all the information the department needed to store, and it was taking a long time for team members to access the data they needed. to fix the problem, the technician installed new, larger hard drives on all the computers.
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
What questions about an audience should be asked during presentation preparation? check all that apply. what does the audience already know about the topic? how will multimedia tools inspire the audience? is the information interesting and engaging? how will this information affect the presentation? will the audience change the message’s purpose? what is likely to interest the audience?
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
Your is an example of personal information that you should keep private.
Answers: 2
You know the right answer?
At the beginning of the semester, we studied partially filled arrays. This is when the number of ele...
Questions
question
Biology, 05.02.2020 11:55
question
Mathematics, 05.02.2020 11:55
question
Mathematics, 05.02.2020 11:55
question
Social Studies, 05.02.2020 11:55
Questions on the website: 13722361