subject

Write a function that accepts an int array and the array's size as arguments. The function should initialize all elements of the array to their indexed position plus one (e. g. element 0 should have the value 1, element 1 should have value 2, element 2 should have value 3, etc.). Write a function that accepts an int array and a pointer to the array's size as arguments. The function should create a new array that is twice the size of the argument array. The function should copy the contents of the argument array to the new array and initialize the unused elements of the new array with zero. The function should return a pointer to the new array. Write a function that accepts an int array and the array's size as arguments. The function should reverse the elements of the array parameter in place (i. e. do not use another array). Write a function that accepts an int array and the array's size as arguments. The function should neatly print an array (as shown in the sample output below). Demonstrate your functions in a complete program that first creates a dynamic array, then passes it to the function that expands the array, then passes it to the function that reverses it Print the array at each step of the program. Free heap memory that is no longer needed. Protect function parameters that should not be mutated by using const. Demonstrate your pointer prowess by using only pointer notation to access array elements. This assignment is all about using pointers; you will not get credit for any part of the assignment in which you use array notation. Do not use reference parameters.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:10
Write an application that allows a user to enter the names and birthdates of up to 10 friends. continue to prompt the user for names and birthdates until the user enters the sentinel value “zzz” for a name or has entered 10 names, whichever comes first. when the user is finished entering names, produce a count of how many names were entered, and then display the names. in a loop, continuously ask the user to type one of the names and display the corresponding birthdate or an error message if the name has not been previously entered. the loop continues until the user enters “zzz” for a name. save the application as birthdayreminder.java.
Answers: 1
question
Computers and Technology, 22.06.2019 14:30
If the polar bear were taken out of the food chain what would happen to the seal population the seal population would diminish the seal population would grow dramatically the seal population would stay the same the seal population would decrease slightly
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
Which of the following examples has four beats in each measure?
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
You know the right answer?
Write a function that accepts an int array and the array's size as arguments. The function should in...
Questions
Questions on the website: 13722367