What is a class?

Answers were Sorted based on User's Feedback



What is a class?..

Answer / deepak saini

class is the collection of data and functions(methods)
which are used to collect that data.

Is This Answer Correct ?    3 Yes 0 No

What is a class?..

Answer / pushpanjali panda

class is a user defined entity which has some real world
existence,and it is a way to bind the data and its
associated functions of different datatypes

Is This Answer Correct ?    1 Yes 0 No

What is a class?..

Answer / 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

More C Interview Questions

what is the function of void main()?

8 Answers  


What is the difference between fread and fwrite function?

0 Answers  


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} what would be the output?

1 Answers   Wipro,


what do the 'c' and 'v' in argc and argv stand for?

0 Answers   TISL,


In C language, a variable name cannot contain?

0 Answers  






How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?

1 Answers  


What are runtime error?

0 Answers  


what is c

4 Answers  


which type of aspect you want from the student.

0 Answers   IBM, TCS,


please give me some tips for the placement in the TCS.

0 Answers   TCS,


What are header files and what are its uses in C programming?

0 Answers  


what is data structure

5 Answers   Maveric, TCS,


Categories