Answered step by step
Verified Expert Solution
Link Copied!

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++
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions