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
The new function is called a rep chart Its declaration looks like this void rep chartcharint declara... View full answer
Get step-by-step solutions from verified subject matter experts
