Question
C++ 1) Pointer basics a) Declare two (type double) pointer variables named d_var and d_array: b) Write C++ statements to dynamically create a double-precision floating-point
C++
1) Pointer basics
a) Declare two (type double) pointer variables named d_var and d_array:
b) Write C++ statements to dynamically create a double-precision floating-point variable and store its address in d_var. Also dynamically create an array of 10 double-precision floating-point values and store its address in d_array:
c) Write C++ statements to input a value for d_var (i.e., a value that d_var points to) from the console and then display it:
d) Write C++ statements to initialize the 10 double values in the dynamically allocated array to 1.0 :
e) Now write C++ statements to de-allocate the memory (i.e. using the delete operator) pointed by d_var and d_array
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