Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program for function overloading?

Answer Posted / narmadha

same function name with multiple definitions

#include <iostream.h>
void print(int i)
{
cout << " int " << i << endl;
}
void print(double f)
{
cout << " float " << f << endl;
}
void print(char* c)
{
cout << " char " << c << endl;
}
int main()
{
print(10);
print(10.10);
print("a");
return 0;
}

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between multiple inheritance and multilevel inheritance?

1150


what are the different types of qualifier in java?

2276


What is difference between abstraction and encapsulation?

1083


what is different between oops and c++

2549


Write a program to reverse a string using recursive function?

2346


What is encapsulation in simple terms?

1042


What is super in oop?

1176


What is multilevel inheritance explain with example?

1149


what is difference between class template and template class?

2661


What is the difference between a constructor and a destructor?

1262


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1635


Where You Can Use Interface in your Project

1893


Describe these concepts: Polymorphism, Inheritance and Abstraction.

1199


What is inheritance in simple words?

1058


hi all..i want to know oops concepts clearly can any1 explain??

2138