Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is a class?

Answer Posted / abalonesoft

A class defines a data type, much like a struct would be in
C. In a computer science sense, a type consists of both a
set of states and a set of operations which transition
between those states. Thus int is a type because it has both
a set of states and it has operations like i + j or i++,
etc. In exactly the same way, a class provides a set of
(usually public) operations, and a set of (usually
non-public) data bits representing the abstract values that
instances of the type can have.

You can imagine that int is a class that has member
functions called operator++, etc. (int isn't really a class,
but the basic analogy is this: a class is a type, much like
int is a type.)

Note: a C programmer can think of a class as a C struct
whose members default to private. But if that's all you
think of a class, then you probably need to experience a
personal paradigm shift.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to throw some light on the b tree?

1091


Why do we use null pointer?

1073


How can I open files mentioned on the command line, and parse option flags?

1074


Explain bitwise shift operators?

1253


What is pointers in c with example?

1080


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2749


How can my program discover the complete pathname to the executable from which it was invoked?

1079


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1109


code for find determinent of amatrix

1972


What is the advantage of c?

1132


I need previous papers of CSC.......plz help out by posting them.......

2298


What is the most efficient way to store flag values?

1192


What happens if you free a pointer twice?

1087


What is build process in c?

1160


What is the acronym for ansi?

1051