Question: Create a C++ program to perform the following operations to calculate the area and circumference of a circle: define a nameless double variable in heap
Create a C++ program to perform the following operations to calculate the area and circumference of a circle: define a nameless double variable in heap and assign 3.1415926 as its value, representing the value of PI; define an integer variable representing the radius of a circle; define a double variable representing the area of a circle; define a double variable representing the circumference of a circle; calculate the area and circumference of a circle; print the values of the area and circumference; delete the nameless variable defined in heap
a variable defined in heap is nameless, so it should be accessed and manipulated via a pointer, i.e., you MUST apply pointer to access the variable.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
