write a program for function overloading?
Answer Posted / abhinav kr
#include<iostream.h>
#include<conio.h>
void printline();
void printline(char ch);
void printline(char ch,int n);
void main()
{
printline();
printline('$');
printline('$',5);
}
void printline()
{
clrscr();
for(int i=1;i<=5;i++)
cout<<"*"<<endl;
}
void printline (char ch)
{
for(int i=1;i<=5;i++)
cout<<ch<<endl;}
void printline(char ch,int n)
{
for(int i=1;i<=n;i++)
cout<<ch<<endl;
getch();
}
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
What is encapsulation process?
What is encapsulation in simple terms?
Can we create object of interface?
What makes a language oop?
what is the drawback of classical methods in oops?
What does and I oop mean?
What are the benefits of oop?
Write a program to sort the number with different sorts in one program ??
How oops is better than procedural?
Templates mean
What is the difference between static polymorphism and dynamic polymorphism?
How to use CMutex, CSemaphore in VC++ MFC
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< what's the basic's in dot net write a program using c++ to implement single contiguous
memory mangement techniques.display the content of the main
memory after yhe allocation of jobs and percentage of the
wastage of the main memory