Answer Posted / sujith
The above answer is well explained. In technical terms it
can be explained as same function name with different
signature. Signature means only interms of arguments, and
not for return types. The idea is very simple and is a
feature which make the end user comfortable, and as Swetcha
said, it is finally the compiler will decide, which function
to call when, according to the type of data passed to the
function.
eg. int add(int, int)
double add(double, double)
char add(char, char)
but the following is not possible
int add(int, int)
char add(int, int)
| Is This Answer Correct ? | 0 Yes | 7 No |
Post New Answer View All Answers
What are two types of polymorphism?
What is inheritance in simple words?
What does <> mean pseudocode?
What is overriding vs overloading?
What is polymorphism what are the different types of polymorphism?
What is class encapsulation?
#include
What is class and example?
What is inheritance in oop?
State what is encapsulation and friend function?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
What is object and example?
What are oops methods?
What is object in oop?
What is encapsulation in oops?