Question: 4 A function printchar is defined as void printchar(char ch=*, int len=40) { for(int x=0; x < len; x++) cout < < ch; cout

4 A function printchar is defined as void printchar(char ch="*", int len=40) { for(int x=0; x < len; x++) cout < < ch; cout < < endl; How will you invoke the function printchar for following

4 A function printchar is defined as void printchar(char ch="*", int len=40) { for(int x=0; x < len; x++) cout < < ch; cout < < endl; How will you invoke the function printchar for following output: (1) to print 40 times FWY (ii) to print *** 20 times (iii) to print '= 40 times (iv) to print 30 times

Step by Step Solution

3.44 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answe... View full answer

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 Programming Questions!