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                      
Google
   
 
Categories >> Software >> Programming Languages >> C++ >> C++ General
 
 


 

 
 STL interview questions  STL Interview Questions (91)
 OOPS interview questions  OOPS Interview Questions (558)
 C++ General interview questions  C++ General Interview Questions (458)
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 the difference between method and message? HP 4
reading material is provided 3 books for c++ if u need more do let me know thnx i hve lots of material do let me know if u want it   2
Write a function which takes a character array as input and reverses it in place. Lehman-Brothers 2
let a,b,c be three integer numbers.write a c++ program with a function void rotate 1()such that a->b->c and c->a.   1
What is "mutable" keyword? Infosys 2
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Lucent 5
There is a magic square matrix in such a way that sum of a column or a row are same like 3 5 2 4 3 3 3 2 5 sum of each column and row is 10. you have to check that matrix is magic matrix or not? TCS 1
class professor {}; class teacher : public virtual professor {}; class researcher : public virtual professor {}; class myprofessor : public teacher, public researcher {}; Referring to the sample code above, if an object of class "myprofessor" were created, how many instances of professor will it contain? a) 0 b) 1 c) 2 d) 3 e) 4 Quark 4
in C++ , the word plus plus who found this?   4
Can we remove an element in a single linked list without traversing? Lets suppose the link list is like this 1 2 3 4 5 6 We need to remove 4 from this list (without traversing from beginning) and the final link list shud be 1 2 3 5 6 only thing we know is the pointer to element "4". How can we remove "4" and link "3" to "5"? CSC 6
i want the NIC programmer-B model papaer pattren, iwant the all model papers? NIC 15
What C++ libraries are you proficient with? Google 1
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com