Question
Need answer from C++ programming Language Pointers 1. Create dynamic variable of double type using the pointer p1. Set value to this variable using pointer
Need answer from C++ programming Language
Pointers
1. Create dynamic variable of double type using the pointer p1. Set value to this variable using pointer p1. Output address of the dynamic variable and it's value to the screen using pointer p1. Create another pointer p2 that refers to the same dynamic variable. Output address of the dynamic variable and it's value to the screen using pointer p2. Delete dynamic variable using pointer p1. Try to output the value of this variable using pointer p2. Delete pointer p2.
2. Create a program with user dialogue. Create a pointer to the array of double type and ask user to enter the size of this array. Develop 4 functions:
2.1. function for memory allocation for this array
2.2. function for input of values (manual or random)
2.3. function to output the values
2.4. function to remove the array (free the memory)
3. Create a dynamic array of integer variables. Allocate memory for 12 elements. Create a function that will fill in the array with random values. Create the function that outputs the values of the array. Output values of the array. Create a function that changes the values of odd and even places of the array. Call the function and output the array one more time.
For example:
Index: 0 1 2 3 Result: Index: 0 1 2 3
Value: 5 2 4 7 Value: 2 5 7 4
4. User sets number of columns and rows in two dimensional arrays. Create function for filling in the array with random numbers from 10 to 50. Create the function that outputs the array to the screen.
#############
Need answer from C++ programming Language
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started