ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
Difference between over loading and over ridding? 
 Question Submitted By :: Sanglap
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Difference between over loading and over ridding?
Answer
# 1
overloading means when you define more than one function 
with the same name but different with its signature.


over ridding means give the modified defination of the 
inherited functions or methods.
 
Is This Answer Correct ?    0 Yes 0 No
Azhar Iqbal
 
  Re: Difference between over loading and over ridding?
Answer
# 2
Overloading is nothing but compile time allocation where we 
will come to know which method will be called. In this 
method we can overload either a method or even operators 
too.

Overridding is nothing but run time allocation. We being 
programmers can let the program to deside which method 
should be called during the execution.  During comp time, 
we will never come to know which object will call which 
method. This can be achived by using VIRTUAL keyword.
 
Is This Answer Correct ?    0 Yes 0 No
Shashikanth C R
 
 
 
  Re: Difference between over loading and over ridding?
Answer
# 3
Overloading: Same function or operator responds differently 
on different types on inputs. This is done by defining a 
function (including operator fn() definition) with the same 
name but different argument list.

Overriding: Redefining any base class function in a 
derieved class to work differently than what is defined in 
the base class. So, now the same function called with same 
argument list will behave differently when called on the 
objects of base and derieved class.

Important: Which instance of function to bind with the 
object depends on the type of object on which the function 
is called and is decided on compile time. This is also 
called early binding or compile time polymorphism.
 
Is This Answer Correct ?    0 Yes 0 No
Manav Sharma
 
  Re: Difference between over loading and over ridding?
Answer
# 4
over loading is nothing but
 
Is This Answer Correct ?    0 Yes 0 No
Varsha Vilas Kalebag
 
  Re: Difference between over loading and over ridding?
Answer
# 5
overloading means one function name havimg different 
arguements.
but overriding means the base as well as the derived class 
havimg same function name
 
Is This Answer Correct ?    0 Yes 0 No
Srabani
 
  Re: Difference between over loading and over ridding?
Answer
# 6
Overloading means when we write diffrent fun. With the Same name & with diffrent singnature then it is called  overloading .     Overiding means both base & derived class has same name.
 
Is This Answer Correct ?    0 Yes 0 No
Amit,mumbai
 
  Re: Difference between over loading and over ridding?
Answer
# 7
Overloading:-Writing Two or three methods with same name 
but different parameters in same class,it is called 
methodOverloading.

Overriding:-writing same methodname and parameters in 
subclass and superclass with same return  type,it is called 
methodoverriding.
 
Is This Answer Correct ?    0 Yes 0 No
Nagababu
 
  Re: Difference between over loading and over ridding?
Answer
# 8
Difference

Method OverLoading
1. Same method name with different number of argument
2. Number of argument with different datatype
3. Each method may returns different type of value
4. All overloaded methods founds to be in one class.

Method OverRiding
1. Same method name with same number of argument
2. Number of argument with same datatype
3. Each method must returns same type of value
4. Each overrided method of base class founds in respective 
derived class.
 
Is This Answer Correct ?    0 Yes 0 No
Rameshwar Gaikwad
 
  Re: Difference between over loading and over ridding?
Answer
# 9
over loading : diff functns hvng same name are invoked
during the program whnever required by the programmer.

over ridding : gvs modified defination 2 d functns
 
Is This Answer Correct ?    0 Yes 0 No
Imlepakshi
[K.C College]
 
  Re: Difference between over loading and over ridding?
Answer
# 10
Method Overloading is the method name looks similar but 
return type and method arguement (inside parameter) differs.

Method Overiding is that the method name, arguements and 
return type seems similar on both base and derived class. 
(Sometimes we will add the additional code to the derived 
class method also).
 
Is This Answer Correct ?    0 Yes 0 No
Vasanth
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
Which is the parameter that is added to every non-static member function when it is called?  3
What is Method overloading?  4
How would you stop a class from class from being derived or inherited. Ness-Technologies7
We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts? IBM3
how to create thread in java? Infosys10
What do you mean by inline function?  1
What is command routing in MFC GE1
What do you mean by pure virtual functions?  4
Describe what an Interface is and how it?s different from a Class. Spinsys4
what is the difference between <stdio.h>and "stdio.h"?  2
When is it necessary to use member-wise initialization list in C++?  1
WHAT IS ABSTRUCT DATA TYPE ? PLEASE EXPLAIN IT. HCL1
what is the usage of clas templates  5
what is object slicing? Wipro4
what is virtual function in c++  4
how can we design a magic square in c++?or suggest me the basic idea of it.  1
Given two strings like x=?hello? and y=?open?, remove any character from string x which is also used in string y, thus making the result x=?hll?. IBM8
WILL I GET A guaranteed JOB AFTER DOING bsc()IT) and GNIIT from an NIIT CENTRE?? Biocon1
What is virtual constructors/destructors?  3
Why do we use virtual functions?  3
 
For more OOPS Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com