Given any std:: array of directly printable objects to standard output (std::cout), write a function template named prg_question_4 to print the array content to the standard output. By default each element must be printed in a new line-the default separator parameter is the new line character, \n. This means by default your function prints the array vertically (because of \n). See below table for few example calls on printing the array, an array = {1, 2, 3). Call prg_question_4(an_array) Criteria 1 2 3 Output prg_question_4(an_array, ", ") prg_question_4(an_array, "") Do the following: 1. Follow UMPIRE process to get the algorithm. Write only the algorithm as code comments (2 points) 2. Implement your function 3. Test your function for first two calls for arrays {1, 2, 3} and {"C++", "Java", "Python"}. Please follow the test criteria given in the code template 1, 2, 3, 123 to

icon
Related questions
Question

Pl

Given any std:: array of directly printable objects to standard output (std::cout), write a
function template named prg_question_4 to print the array content to the standard
output. By default each element must be printed in a new line-the default separator
parameter is the new line character, \n. This means by default your function prints the
array vertically (because of \n).
See below table for few example calls on printing the array, an_array = {1, 2, 3).
Call
prg_question_4(an_array)
prg_question_4(an_array,
", ")
prg_question_4(an_array, "")
Criteria
1
2
3
1, 2, 3,
123
Output
Do the following:
1. Follow UMPIRE process to get the algorithm. Write only the algorithm as code
comments (2 points)
2. Implement your function (points)
3. Test your function for first two calls for arrays {1, 2, 3) and {"C++", "Java",
"Python"}. Please follow the test criteria given in the code template points)
Transcribed Image Text:Given any std:: array of directly printable objects to standard output (std::cout), write a function template named prg_question_4 to print the array content to the standard output. By default each element must be printed in a new line-the default separator parameter is the new line character, \n. This means by default your function prints the array vertically (because of \n). See below table for few example calls on printing the array, an_array = {1, 2, 3). Call prg_question_4(an_array) prg_question_4(an_array, ", ") prg_question_4(an_array, "") Criteria 1 2 3 1, 2, 3, 123 Output Do the following: 1. Follow UMPIRE process to get the algorithm. Write only the algorithm as code comments (2 points) 2. Implement your function (points) 3. Test your function for first two calls for arrays {1, 2, 3) and {"C++", "Java", "Python"}. Please follow the test criteria given in the code template points)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer