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  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++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What is the differances between a abstract calss and 
interface
 Question Submitted By :: Skiran_81
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the differances between a abstract calss and interface
Answer
# 1
An abstract class holds both method prototpypes and method 
definitions also...But it is not in the case of 
interface..It can contain only protypes.. It should be 
defined only where it is implemented...
 
Is This Answer Correct ?    10 Yes 2 No
Maria Alex
 
  Re: What is the differances between a abstract calss and interface
Answer
# 2
Abstract base classes can have data members but not interfaces.

Abstract base classes have private access specifier by
default while that of interfaces is public
 
Is This Answer Correct ?    3 Yes 0 No
Abhijit
 
 
 
  Re: What is the differances between a abstract calss and interface
Answer
# 3
ABTRACT CLASS:
-------------	
•	It can not be instantiated

•	It allow us to specify all access modifier except  
Private

•	A class inheriting this must implement all of its 
abstract method


•	A class can inherit only one abstract class at a 
time.

•	Abstract class can add more functionality with out 
destroying child classes that were using old version. 


•	We can declare the following
1.	Fields
2.	Constructors
3.	Static Constructors
4.	Static Functions
5.	Concrete Functions

INTERFACE :
---------
	
•	It can not be instantiated

•	It allows only public Access modifier

•	A class implementing interface must provide body 
for its entire member.



•	A class can implement more than one interface at a 
time.

•	Adding of additional functionality will have an 
effect on its child class due to the necessary 
implementation of interface methods.

•	We can not declare the following
1.	Fields
2.	Constructors
3.	Static Constructors
4.	Static Functions
5.	Concrete Functions
 
Is This Answer Correct ?    1 Yes 0 No
Porchelvi .a
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
What is public, protected, private? Satyam4
Difference between new operator and operator new  2
What is the differances between a abstract calss and interface Aviva3
what is object slicing TCS2
what is SPL in c++.  1
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? IBM4
What are the OOPS concepts? Wipro36
What is Method overloading?  4
why function overloading is not called as pure polymorphism?  1
why we call c++ is object oriented lanaguage HCL2
all about pointers  2
sir i want to know which posting to apply since i am BE CSE.. also want to know what are the rounds there for my interview...Expecting for ur valuable answer....  2
When a private constructer is being inherited from one class to another class and when the object is instantiated is the space reserved for this private variable in the memory?? Honeywell13
//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }  1
polymorphism means? BFL2
What is a scope resolution operator? HP5
Write 7 differences between "Public" function and "Private" function? IBM2
i had specified the access specifier for abstarct class member like (pure virtual function) as private.But it can be accessed by the derived class.How the private member of one class is accessed by other class.if any body face this problem and found the solution plz reply to me. Syntel1
what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....  6
What is an object? HCL8
 
For more OOPS 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 © 2007  ALLInterview.com.  All Rights Reserved.

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