Click here to Skip to main content
13,195,564 members (63,175 online)
Rate this:
Please Sign up or sign in to vote.
See more:
if we have two functions like

int fun1(int,int)
double fun1(int,int)

this is ex of what overloading or overidding?
Posted 17-Jan-13 19:44pm
Who told you so?!
d@nish 18-Jan-13 1:58am
d@nish 18-Jan-13 1:59am
Tooth fairy. :)
d@nish 18-Jan-13 1:59am
This is an example of you being too lazy to read a book or browse one of the >billion online tutorials.
Please, stop spamming with your previous question which I deleted two times. This is not a place for interview questions "invented" by idiotic interviewer, just a disgrace. We answer serious questions, not multiple-choice riddles. Such interview questions is just a shame. Please, don't post such trash, it won't help you.
Anyway, I finally answered this bad question. Maybe just lost my time (please see my other comments...).
Agree, but I answered. (Sigh... my sin... :-)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It is absolutely impossible to answer without the context of this code. Moreover, this question makes no sense at all.
And this is a very poor method of learning something. It's much better to read a simple manual, do the exercises, and ask question only when you stuck.

Overriding is a serious effect, the very base and the heart of OOP. It's too long story to explain how OOP works, but you will need to learn it.

Overloading is just the confusing term for... practically nothing. Nothing is "overloaded" because nothing is "loaded". This is a jargon for a very simple situation: two or more totally different functions may have identical name, if and because a compiler can distinguish them by different signature. For certain call codes, it may or may not be possible; if not, a compilation error is shown.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171019.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100