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                      
tip   SiteMap shows list of All Categories in this site.
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
Describe what an Interface is and how it?s different from a
Class.
 Question Submitted By :: Gvsk
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Describe what an Interface is and how it?s different from a Class.
Answer
# 1
In Interface,we cannot specify any definition inside but
where as class we can.
 
Is This Answer Correct ?    1 Yes 0 No
Mouli
 
  Re: Describe what an Interface is and how it?s different from a Class.
Answer
# 2
interface is define as the declaration part of the function.
interface is differ from the class by class can access the 
interface but interface cannot access the class
 
Is This Answer Correct ?    0 Yes 0 No
Kalaivani
 
 
 
  Re: Describe what an Interface is and how it?s different from a Class.
Answer
# 3
Class can hold both member function and data, depending upon
the member function class becomes abstract class and etc.
but if a class contain only pure virtual function then it
becomes "Interface",remember all functions should be pure
having no data member.
 
Is This Answer Correct ?    0 Yes 0 No
Nishikant Sahu
 
  Re: Describe what an Interface is and how it?s different from a Class.
Answer
# 4
interface is collection of abstract method.we can not 
define any method in interface.we can implement that 
abstract method by using the class.there is a restriction 
in interface that you have to implement  all the abstract 
method in the class which is declared in interface.and we 
can not create an object of interface.if we want to execute 
the interface method then we have to implement first that 
interface in any class after that create the object of 
class ,then we can access execute that method


but in class we have to define the methods, which is 
declered.we can also access that method through the object 
of the class.
 
Is This Answer Correct ?    2 Yes 0 No
Amit Upadhyay
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
WHAT IS THE DIFFERENCE BETWEEN ABSTRUCTION AND ENCAPSULATION? PLEASE EXPLAIN IT.  3
When is an object created and what is its lifetime? IBM1
What do you mean by pure virtual functions?  4
Why u change company? BOB-Technologies3
Difference between realloc() and free? HP3
What is OOPS and How it is different from Procedural Programming ? HP10
What is the difference between const int *ptr and int const *ptr???  2
What is the correct syntax for inheritance? 1) class aclass : public superclass 2) class aclass inherit superclass 3) class aclass <-superclass  4
What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?  1
What are generic functions and generic classes?  2
can you explain how to use JavaBean in Project Infosys1
Can we have a private virtual method ? Ness-Technologies5
how do u initialize the constant variables Siemens4
What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance? Accenture3
what is an instance of a class  2
You have one base class virtual function how will call that function from derived class?  4
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
Have you ever used threads? IBM2
Why do we use virtual functions?  3
Explain the concept of abstracion and encapsulation with one example. What is the difference between them? PCS2
 
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