Question: 2 Write C++ statements that do the following a. Declare an array alpha of 15 components of type int. b. Output the value of the

 2 Write C++ statements that do the following a. Declare an

2 Write C++ statements that do the following a. Declare an array alpha of 15 components of type int. b. Output the value of the senth component of c. Set the value of the fifth component of the array alpha to 35 d. Set the value of the ninth component of the array alpha to the sum of the the array alpha sixth and thisrteenth components of the array alpha e. Set the value of the fourth component of the array alpha to throe times the value of the eighth component minus 57 f Output alpha so that five components per line are primted. (30 points) 3. Write a function that will return the sum of all digits in an integer. The function header is as follows int sum(int number ); (for example, sum(1234) returns 10 and sum(12345) returns 15.) (16 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!