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 the difference between abstraction and polymorphism?
What is meant by multiple inheritance?
Why is polymorphism important in oop?
What is cohesion in oop?
What is overriding in oops?
What does <> mean pseudocode?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
How is class defined?
how to get the oracle certification? send me the answer
What is encapsulation in ict?
What are the 3 principles of oop?
What is the difference between inheritance and polymorphism?
What exactly is polymorphism?
What are main features of oop?
What is data binding in oops?