Question: c program There is starting segment of program and sample output. pls explain the coding hello 2. Write a program to: a. Read Test 1

 c program There is starting segment of program and sample output.

pls explain the coding hello 2. Write a program to: a. Read

c program There is starting segment of program and sample output.

pls explain the coding

hello

2. Write a program to: a. Read Test 1 and Test 2 marks and store in array test1 and array test2 where each array stores 5 elements. b. Total up marks from test1 and test2 arrays and store in array named total. C. Print the total marks from array total. Use pointers to access array members. Sample Output: Enter Test 1 and Test 2 marks : 50 80 Enter Test 1 and Test 2 marks : 40 60 Enter Test 1 and Test 2 marks : 30 70 Enter Test 1 and Test 2 marks : 84 56 Enter Test 1 and Test 2 marks : 55 90 Test1[0] = 50 Test2[0] = 80 Test1[1] = 40 Test2[1] = 60 Test1[2] = 30 Test2[2] = 70 Test1[3] = 84 Test2[3] = 56 Test1[4] = 55 Test2[4] = 90 = Total [0] = 130 Total [1] = 100 Total [2] = 100 Total [3] = 140 Total [4] = 145 Use the following segment to start your program. #include int main() { int test1[5]; int *test1Ptr; int test2[5]; int *test2Ptr; int total[5]; int *totalPtr; int i, j; test1Ptr = test1; test2Ptr = test2; totalPtr = total; //read values and store into test1 and test2 //print contents array test1 and test2 //sum test1 and test2 and store in array total }

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!