GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Next Question 
 C++  |  Question 1 of 203    Print  
What is a class?
Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.
 


  
Total Answers and Comments: 13 Last Update: June 15, 2009   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: renu
 
class is a user defined data type,in which data members and member functions are defined.

Above answer was rated as good by the following members:
deddy83, ozkan, the_ankit1987, anellona, manjunath_17
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
June 28, 2005 00:35:51   #1  
renu        

RE: What is a class?
class is a user defined data type in which data members and member functions are defined.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
September 18, 2005 08:58:09   #2  
hirma        

RE: What is a class?
class is a userdefined datatype which consists of attributes(datamembers) and behavior(member functions).Bydefault the members of a class is private.
 
Is this answer useful? Yes | NoAnswer is useful 3   Answer is not useful 0Overall Rating: +3    
October 11, 2005 02:08:56   #3  
swapna        

RE: What is a class?
Class is combination of member variables and member functions
 
Is this answer useful? Yes | No
December 16, 2005 07:58:46   #4  
Kusuma        

RE: What is a class?
Class is a User Defined Data Type....it encapsulate both data and functions.Real time Example: Car is a class....under which we have different types which is called a object interms of OOP.Software Ex: if i declare variable say int a; .....here int is CLASS. and a is obeject of int class.
 
Is this answer useful? Yes | No
May 21, 2006 15:38:22   #5  
dunnnnno        

RE: What is a class?
class is such a bhosdaap which i can never understand whatz the need of this new feature instead of allowing a structure some more functionality.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    
March 22, 2007 07:51:13   #6  
dharmagee Member Since: February 2007   Contribution: 12    

RE: What is a class?
Class is a data structure which is used to store variables and functions together. For example House is a class which consists of several components like the Bathroom Dining hall kitchen and etc
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 30, 2007 09:48:45   #7  
jaya        

RE: What is a class?
A class is a user defined data type. A class is a collection of objects of similar type
Ex: Consider Bird class. Parrot Sparrow Peacock are the members of Bird class.

 
Is this answer useful? Yes | No
June 13, 2007 04:00:33   #8  
SomGollakota Member Since: June 2007   Contribution: 48    

RE: What is a class?
A class is a user-defined data type that encapsulates data and methods that can act upon the data together.

A class can also be defined as a classification/category of objects that have similar attributes and behaviour. For example Automobile is a category of objects that have similar attributes such as wheels engine doors shape color cylinders etc. and behaviours such as start run move turn etc. Car is an instance of automobile which has different values for the attributes (4 wheels one engine 2 or 4 doors 4/6/8 cylinders etc) whereas a semi-truck is another instance of automobile that has different values for the same attributes (18 wheels one engine two doors and so forth).

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
August 08, 2007 02:23:43   #9  
narendrasappati        

RE: What is a class?
A class is a User Defined Datatype which acts as a Model. Means we can create objects with that Class(model). Its a collection of datamembers and Memberfunction.
 
Is this answer useful? Yes | No
July 07, 2008 23:38:49   #10  
ajish babu Member Since: July 2008   Contribution: 2    

RE: What is a class?

Class is a data type .Class is a blue print of objects. Class gives an opportunity to define his on class according to his problem rather than using existing data type like float char e.t.c.


 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape