I need some help to program (execute) thefollowing three question: Q1 ; Create a
ID: 3614583 • Letter: I
Question
I need some help to program (execute) thefollowing three question: Q1; Create a function repchar() that has two defaultarguments. The header in the function definition shouldlook like:void repchar(char ch, int n) The function should display the character in ch,n number of times. Use '*' as the default argumentfor ch and 45 as the default argument forn. Demonstrate that repchar works by calling it threetimes in main() with: no arguments
'&' as the single argument
'%' and 30 as the arguments
Q2: Create threedefinitions for an overloaded functionrepchar(). Demonstrate that the functions work byhaving a main() which consists of the followingcalls: voidmain() { repchar(); // displays 45 '*' on the screen repchar('='); // displays45 '=' on the screen repchar('+',30); // displays 30 '+' onthe screen } Each function call will call a differentoverloaded function.
Q3: Create a functioncalled Count() that keeps track of how many times it hasbeen called. Each time it is called, it should display a linesimilar to:
This is call Number5
Demonstrate that it works by setting up a loop inmain() that will call it five times. Do not usereference variables. I need some help to program (execute) thefollowing three question: Q1; Create a function repchar() that has two defaultarguments. The header in the function definition shouldlook like:
void repchar(char ch, int n) The function should display the character in ch,n number of times. Use '*' as the default argumentfor ch and 45 as the default argument forn. Demonstrate that repchar works by calling it threetimes in main() with: no arguments
'&' as the single argument
'%' and 30 as the arguments
Q2: Create threedefinitions for an overloaded functionrepchar(). Demonstrate that the functions work byhaving a main() which consists of the followingcalls: voidmain() { repchar(); // displays 45 '*' on the screen repchar(); // displays 45 '*' on the screen repchar('='); // displays45 '=' on the screen repchar('+',30); // displays 30 '+' onthe screen repchar('+',30); // displays 30 '+' onthe screen } Each function call will call a differentoverloaded function.
Q3: Create a functioncalled Count() that keeps track of how many times it hasbeen called. Each time it is called, it should display a linesimilar to:
This is call Number5
Demonstrate that it works by setting up a loop inmain() that will call it five times. Do not usereference variables.