Click here to Skip to main content
11,920,156 members (57,813 online)
Rate this:
Please Sign up or sign in to vote.
See more: OOP
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 20:44pm
Who told you so?!
d@nish 18-Jan-13 1:59am
Tooth fairy. :)
Anyway, I finally answered this bad question. Maybe just lost my time (please see my other comments...).
d@nish 18-Jan-13 1:58am
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.
Agree, but I answered. (Sigh... my sin... :-)
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.

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
0 OriginalGriff 455
1 phil.o 170
2 CPallini 150
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,495
2 Sergey Alexandrovich Kryukov 3,153
3 George Jonsson 2,810
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web03 | 2.8.151120.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2015
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