Write a program that creates a pointer to a dynamic array

Assignment Help Computer Engineering
Reference no: EM132209663

Write a program that creates a pointer to a dynamic array of integers of size 10. The program will load the array with values from 1 to 10 then:

Using the following functions:

A function that accepts the pointer to the integer array and the array size as a arguments, creates a pointer to a new copy of the array, except the values will be reversed in the copy. The function should return the pointer to the new array.

A function that accepts the integer array, and the array size as an argument. The function should create a new array that is twice the size of the original array. It should copy the original array information in and then initialize the unused elements to 0. It should return a pointer to the new array.

A function that accepts the integer array, and the array size as an argument. The function should create a new vector object that is twice the size of the original array. It should copy only the even values of the original array information into the new vector and then initialize the unused elements to 0. It should return a pointer to the new vector.

A function that accepts the integer array and the array size as a arguments. It should print the array's data with spaces between the numbers

Any other function you need.

In main,

print the array

call the reverse function,

print the reversed array,

call the doubling function

print the doubled array

call the vector creator function

print the vector.

Print a header before each array print to know what it is doing.

Reference no: EM132209663

Questions Cloud

Display the median value : Write a program in which you create a 2D array of type double with 40 rows and 5 columns.
Write a program that converts centimeters to inches : Write a program that converts centimeters to inches. Your program should prompt the user to enter a height in centimeters, convert it to inches.
Display all integers between low and high that are the sum : Write a program that displays all integers between low and high that are the sum of the cube of their digits.
Determine the address of memory locations allocated : Declare two short int variables, two int variables, and long int variable and then output the address of each variable.
Write a program that creates a pointer to a dynamic array : Write a program that creates a pointer to a dynamic array of integers of size 10. The program will load the array with values from 1 to 10.
Write a program in which you create a text class : Write a program in which you create a Text class that contains a string object to hold the text of a file.
Fill the first vector object with the loop counter value : Write a program that creates three vector objects. Fill the first two objects with 25 floating-point numbers using a for loop.
Write a program that draws a pyramid of blocks of any given : Write a program that draws a pyramid of blocks of any given height in Java. *USING RECURSION*
Write a program that enables two users to chat using javafx : Write a program that enables two users to chat using JavaFX, threads, sockets. Implement one user as the server and the other as the client.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd