Question: In C++ Write a function called printChar that takes 2 parameters: 1) a char to output 2) how many of them to print and prints

In C++ Write a function called printChar that takes 2 parameters: 1) a char to output 2) how many of them to print and prints the char for the specified number of times WITHOUT newline at the end.

For example, when you call this function with a and 3 as the parameters then the function should print 3 as in a row which is aaa (WITHOUT newline. NO newline at the end of aaa)

When you call this function with with $ and 5 as the parameters then the function should print 5 $s in a row which is $$$$$ (WITHOUT newline. NO newline at the end of $$$$$)

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!