GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS

 Print  |  
Question:  1.why do we need encapsulation?
2. what is a class in C++ analogous to in C






December 12, 2005 06:52:48 #2
 anil piplani Database Expert  Member Since: December 2005    Total Comments: 11 

RE: 1.why do we need encapsulation?2. what is a ...
 
This answer still didnt answer why do we need encapsulation. Well from wht I know we need encapsulation to ensure the data access is secure. We can control which are the variables of hte class which can be accessed and modified by the functions outside of the class and which are the variables which are private to the class.
     

 

Back To Question