Question: Write output of following program. #include using namespace std; void repchar(char, int); int main() { repchar(-, 43); cout < < Data type Range < <

Write output of following program.

#include
using namespace std;
void repchar(char, int);
int main()
{
repchar(‘-’, 43);
cout << “Data type Range” << endl; repchar(‘=’, 23);
cout << “char -128 to 127” << endl
<< “short -32,768 to 32,767” << endl
<< “int System dependent” << endl
<< “double -2,147,483,648 to 2,147,483,647” << endl;
repchar(‘-’, 43);
return 0;
}
void repchar(char ch, int n)
{
for(int j=0; jcout<< ch;
cout << endl; }

(Refrance:C++)

Step by Step Solution

3.54 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The new function is called a rep chart Its declaration looks like this void rep chartcharint declara... 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!