Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: oops
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
yogika258
Comments
Sergey Alexandrovich Kryukov at 18-Jan-13 1:53am
   
Who told you so?!
—SA
d@nish at 18-Jan-13 1:59am
   
Tooth fairy. :)
Sergey Alexandrovich Kryukov at 18-Jan-13 2:01am
   
:-)
Anyway, I finally answered this bad question. Maybe just lost my time (please see my other comments...).
—SA
d@nish at 18-Jan-13 1:58am
   
What?
d@nish at 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.
Sergey Alexandrovich Kryukov at 18-Jan-13 2:02am
   
Agree, but I answered. (Sigh... my sin... :-)
—SA
Sergey Alexandrovich Kryukov at 18-Jan-13 2:00am
   
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.
—SA

1 solution

Rate this: bad
good
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.
 
—SA
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 544
2 Maciej Los 325
3 DamithSL 223
4 Mathew Soji 195
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,712
2 DamithSL 5,461
3 Manas Bhardwaj 4,916
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2014
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