Question: Create variables for a character, a string, an integer, and a floating point number. Create pointers for each of those variables. Ideally, use the same
Create variables for a character, a string, an integer, and a floating point number.
Create pointers for each of those variables. Ideally, use the same name as the variable but add a p in front of the name. (For example: (total and ptotal)
Ask the user to enter information for each of these variables one at a time. For each variable tell them what they should enter. (For example: Enter a single character or Enter a floating point number) Read in the information and put it in the variables.
Make each pointer point to the respective variable.
Print out values for the four variables without using the variables themselves. Only use the pointers.
In addition print out the addresses of the memory locations that each pointer points to. You can use %p for that.
Output should look like the bottom sample.
Copy and paste the code and the output into a Word document and submit.
Character: k Integer: 4 String: [your name without brackets] Note that this is a character array Floating Point: 6.8 Character Pointer: XXXXXXXX Integer Pointer: XXXXXXXX String Pointer: XXXXXXXX Floating Point Pointer: XXXXXXXX
CODE C pls show the outpuit too pls
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
