GeekInterview.com
Series: Subject: Topic:
Question: 267 of 267

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.
Asked by: Interview Candidate | Asked on: Jun 28th, 2005

Editorial / Best Answer

Answered by: hirma

Answered On : Sep 18th, 2005

class is a userdefined datatype which consists of attributes(datamembers) and behavior(member functions).Bydefault the members of a class is private.

Showing Answers 1 - 15 of 15 Answers
renu

Answered On : Jun 28th, 2005

class is a user defined data type,in which data members and member functions are defined.

Yes  1 User has rated as useful.
  
Login to rate this answer.
hirma

Answered On : Sep 18th, 2005

class is a userdefined datatype which consists of attributes(datamembers) and behavior(member functions).Bydefault the members of a class is private.

Yes  5 Users have rated as useful.
  
Login to rate this answer.
swapna

Answered On : Oct 11th, 2005

Class is combination of member variables and member functions

  
Login to rate this answer.
Kusuma

Answered On : Dec 16th, 2005

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.

  
Login to rate this answer.
dunnnnno

Answered On : May 21st, 2006

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.

  
Login to rate this answer.
dharmagee

Answered On : Mar 22nd, 2007

View all answers by dharmagee

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

Yes  1 User has rated as useful.
  
Login to rate this answer.
jaya

Answered On : Apr 30th, 2007

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.

  
Login to rate this answer.
SomGollakota

Answered On : Jun 13th, 2007

View all answers by SomGollakota

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).

Yes  2 Users have rated as useful.
  
Login to rate this answer.
narendrasappati

Answered On : Aug 8th, 2007

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.

  
Login to rate this answer.
ajish babu

Answered On : Jul 7th, 2008

View all answers by ajish babu

 

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.

  
Login to rate this answer.
coolsourabh003

Answered On : Sep 24th, 2008

View all answers by coolsourabh003

CLASS Specifies the criteria to handle  the instance of the problem.The entire set of data and methods associated with the problem can be bound together and implemented as type with the help of class.

  
Login to rate this answer.
gunjan.chandra

Answered On : Jun 12th, 2009

View all answers by gunjan.chandra

Class is an encapsulation of data members and data function which manipulates the data.

  
Login to rate this answer.
ammreddy

Answered On : Jun 14th, 2009

View all answers by ammreddy

A class is an expanded concept of a structure. Instead of holding data it can hold both data and functions.

  
Login to rate this answer.
KomalUpadhyay

Answered On : Nov 14th, 2009

View all answers by KomalUpadhyay

In C, we can use only inbuilt data types for program needs but from C++ we can create userdefined datatypes in form of classes. Classes wrap datamembers and member functions that operate on datamembers together.

  
Login to rate this answer.

A class is a set of objects that share a common structure and a common behavior, a single object is simply an instance of a class.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.