Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this is c++ The following code is intended to find the perimeter and area of a circle. However, it fails to do so. Correct the
this is c++
The following code is intended to find the perimeter and area of a circle. However, it fails to do so. Correct the errors in the code. Also, do not modify the numeric values assigned to the variables in the code. After correcting the code, what is the output? Please submit the screenshots of the corrected code and output. const double PI=3,1416; double sradius? cout fixed showpoint setprecision (2) : radius = new double; xadius =3.27 cout "Perimeter: n2+PX radius endl; cout "Area: " PI radius * radius endl: Output: a. Write the C++ statement that dynamically creates an array of 100 components of type int and assigns the base address of the array to scoretist. Answer: b. Write a Ct+ code that inputs data into the array scorelist from the standard input device. Answer: c. Fill in the underlines below to complete a CH+ code that finds the index of the smallest entry in the. array scoreList. d. Write a CH statement that deallocates the memory space of array to which sales points. Answer: a. Write a statement that declares arxy2D to be pointer to an array of pointers wherein each pointer is of type double. Answer: b. Fill in the underlines below to complete a CH+code that dynamically creates a two-dimensional array of 5 rows and 10 columns and arry 2D contains the base address of that array. Answer: arry20=for(introw=0;rowt+)arry2D[xow]= c. Fill in the underlines below to complete a CH+ code that outputs the data stored into the array votes one row per line. Answer: d. Fill in the underlines below to complete a C++ code that deallocates the memory space occupied b) the two-dimensional array to which votes points. Answer: for(introw=0;row 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