subject

Implement a small program that defines a regular number type variable, and a pointer variable to the same type of number. Create these variables before starting steps 1-11 below. Only one regular variable and one pointer variable should be created for this assignment. Use these variables for the following tasks (be sure to label each of these tasks, using comments):
1) ask the user for a value and store it in the regular variable
2) make the pointer variable point to the regular variable location
3) use both the regular variable and pointer variable to print the VALUE stored and the ADDRESS the value is stored at (four things should be printed, some will be the same)
4) use the pointer variable to allocate memory for a single value
5) store a value into this newly allocated memory
6) print the same items as in step 3 (print the original value & address as well as the newly allocated value and address)
7) deallocate the memory allocated in step 5
8) ask the user for a small number and use the pointer variable to allocate memory for an array of that size of the appropriate number type
9) store random values in all elements of this newly allocated array (use array notation)
10) print all elements of the array (use array notation)
11) deallocate any allocated memory and end the program
The files must be named lab7.cpp. Put your name and the file name as the first two (commented) lines in the file.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
If you combine two cells into one, what action are you performing? a.  adding a new row or column      b.  splitting the cells      c.  removing a new row or column      d.  merging the cells
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Someone plzz me which of these defines a social search? a. asking a search engine a question that is answered by a real person on the other sideb. modifying search results based on popularity of a web pagec.modifying search results based on a ranking of a web page
Answers: 2
You know the right answer?
Implement a small program that defines a regular number type variable, and a pointer variable to the...
Questions
question
Mathematics, 30.06.2019 22:30
question
Mathematics, 30.06.2019 22:30
question
Mathematics, 30.06.2019 22:30
Questions on the website: 13722360