A programmer is trying to write a program that addscorresponding elements of two
ID: 3612766 • Letter: A
Question
A programmer is trying to write a program that addscorresponding elements of two arrays of the same size, and storethe
result into a new array. He has writtenthe following program. Complete the code.
#include <iosteam.h>
int main()
{
int arrayA[ ] = {12, 36, 18, 21};
int arrayB[ ] = {16, 24, 27, 30};
// declare the third arry
int arrayC[5];
// add the elements of arrayA and ArrayB and store inarrayC
… incomplete
// output the elements of the array using a pointer
int* p = &arrayC;
… incomplete
return 0;
}
D. Write a program that adds 5 to each employee number ofvocation days. Use a function to do theseadjustments
E. Write a C++ program the user enter a stream of 3 digits andoutputs theirsum
F. Using for, while and do...while statements; write C++programs respectively that count 1 to10
G. Write a C++ program that computes the mathematical table of10*10