ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 26 May 2017 My Price 9.00

Interpret a Program and Explain How it Works

Could someone please assist me by completing the attached assignment?  I compiled the program and received the "Result is 55", and I understand that this program returns the sum of the elements of the array in recursive fashion, but I am having some difficulty understanding what is what when it comes to the breakdown of the code.  I tend to learn better by reverse engineering things, so any help in completing this assignment would be much appreciate.  Thank you!

 

Interpret a Program and Explain How it WorksIn the textbook, on page 400, solve problem 7.18: What does the following program do?. Copy the sample program and compile it, then find the results. Submit a report which is more than one page length to explain how the program works and how you can improve it. Write comments in C++ comments format in the source file, to explain what the functions are and how they work. Submit your source code file and the executable file by Day 7.//Ex. 7.18: Ex07_18.cpp//What does this program do?#include <iostream>using std::cout;using std::endl;int whatIsThis ( int [], int); //func±on protoypeint main(){const int arraySize = 10;int a [arraySize] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};int result = whatIsThis (a,arraySize);cout << "Results is " <<result << endl;return 0; //indicates successful termina±on} // end main//What does this func±on do?int whatIsThis ( int b[], int size){if (size == 1) // base casereturn b [0];else // recursive stepreturn b [size-1]+ whatIsThis (b, size - 1);} // end func±on whatIsThis

Attachments:

Answers

(11)
Status NEW Posted 26 May 2017 02:05 AM My Price 9.00

-----------

Attachments

file 1495766195-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)