Explain function overloading, C/C++ Programming

Function overloading:

Functions can be defined with same name.  Depending upon the type of argument passed

the function will perform.  This is known function overloading.  It may look like calling the same function but really it is not. This is also called as function polymorphism.

int f_over(int x);

float f_over(float a, float b);

void main( )

{int a=10;

float x=11.11,y=22.2,z;

c =f_over(a); //The value of c is 10

}

int f_over(int x);

{return (x)

};

float f_over(float x, float y)

{return (x/y);

}

Posted Date: 9/20/2012 7:49:47 AM | Location : United States







Related Discussions:- Explain function overloading, Assignment Help, Ask Question on Explain function overloading, Get Answer, Expert's Help, Explain function overloading Discussions

Write discussion on Explain function overloading
Your posts are moderated
Related Questions
Friend classes are used when two or more classes are designed to work together and require access to each other's execution in ways that the rest of the world shouldn't be permitte

A: BinarySearchTree.h ---------------------- #ifndef BINARY_SEARCH_TREE_H_ #define BINARY_SEARCH_TREE_H_ #include "dsexceptions.h" #include // For NULL // Binary

Question 1 Explain Abstract data types with its characteristics Question 2 Let us say your Learning Centre decides to store all the three types of student data Register

Project Description: I'm seeking someone who could write me a torrent seeding client which supports multiple proxies. The goal of the project is to make torrents popular by seed

flowchart of c programing to check the given number is prime or not

What is conversion constructor? explain it .

t a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with these

#question.develop an algorithm using pseudocode for computing cos(x) and sin(x). use a sentinel controlled while loop. use the series definition of e^+-jx

what is oops