Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ programming questions: Thank you very much :) Pointer Syntax Declare a two-d

ID: 2247776 • Letter: C

Question

C++ programming questions:

Thank you very much :)

Pointer Syntax Declare a two-dimensional array of doubles (on the stack) named tickerValues with 12 rows and 31 columns Declare and allocate memory (on the heap) for a two-dimensional array of stringsS named carMakes with 20 rows, each with 6 columns Give the declaration for a function assignPicture() that takes a pointer to a HugeStudentRecord object Give the declaration for a function calculateAverage () that takes an array of doubleS and an int named count Write a call to function calculateAverage (), passing it rainfall

Explanation / Answer

void someMethod() {
   double tickerValues[12][31]; //answer 6
   string **carMakes = new string*[20]; //amswer 7
   for (int i = 0; i < 20; i++)    //answer 7
       carMakes[i] = new string[6]; //answer 7
}

void assignPicture(HugeStudentRecord *hsrPtr);

double calculateAverage(double *arr, int count);

int main() {
   calculateAverage(rainfall,sizeof(rainfall)/sizeof(*rainfall));
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote