ALLInterview.com :: Home Page            
 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  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
   
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What is the difference between "overloading" and "overridding"?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between "overloading" and "overridding"?
Answer
# 1
overloading means that we can use same method with same
name many times for multiple purpose in a class with
difference parameters.

overriding means we can refer a method of a base class with
same name in a derived class with same paameters.
 
Is This Answer Correct ?    8 Yes 0 No
Shivanannd
 
  Re: What is the difference between "overloading" and "overridding"?
Answer
# 2
Overloading uses same funtion with different parameters

Overriding Uses same exactly similar funtion prototypes
this used in runtime polimorphism ie Virtual Funtions
 
Is This Answer Correct ?    2 Yes 0 No
Vighnesh
 
 
 
  Re: What is the difference between "overloading" and "overridding"?
Answer
# 3
Overloading: When more then 1 methods in a class having same
name but they are different in their number of parameters,
different in their parameters types and their order.

Overriding: When a parent class is derived by a child class
and some method which has present in parent class which is
declared as "virtual" in parent class , same method with
same name and parameters and sam type is also declared in
child class without "virtual" keyword, bcz it is by default
virtual in child. SO PARENT AND CHILD CLASS USES SAME METHOD
ARE CALLED OVERRIDING.
 
Is This Answer Correct ?    4 Yes 0 No
Shakti Singh Khinchi
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
What is Name Decoration? Lucent2
What are the advantages and disadvantages of using inline and const? TCS1
What is a pure virtual function? Why is it represented as = 0...how is the internal implementation for the same CTS3
Memory is not a constraint. In a single iteration(NOTE: you can't go back), how will you find out the 10th last node/item in a linked list. Goldman-Sachs16
whats the size of class EXP on 32 bit processor? class EXP { char c1; char c2; int i1; int i2; char *ptr; static int mem; }; Huawei4
i want the NIC programmer-B model papaer pattren, iwant the all model papers? NIC15
difference between c and c++? Infosys38
What is "map" in STL?  2
Which algorithm do you like the most? Why? Google2
What is your strongest programming language (Java, ASP, C, C++, VB, HTML,C#, etc.)? Microsoft22
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == 4 ) y-= 7; else y = 8; Enter a segment of code (without any IF statements) that does exectly the same thing using the switch structure.  1
please help to write the code of chess game in c++?????????? NEC1
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

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