Discuss the below:
Q: Create a template for a function called sum. The function should compute and return the sum of values passed in an array. Another argument send into the function should be the array length. Test the template in a simple driver program that sends values of various types as arguments and displays the results.