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 purpose of sprintf?

0 Answers  


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

0 Answers  


What are c preprocessors?

0 Answers  


what does " calloc" do?

7 Answers   Cadence, Logos,


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

0 Answers  






Why do we use pointer to pointer in c?

0 Answers  


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

0 Answers   Case, IBM,


`write a program to display the recomended action depends on a color of trafic light using nested if statments

0 Answers  


what is the diffrenet bettwen HTTP and internet protocol

0 Answers  


Why enum is used in c?

0 Answers  


void main() { for(; 0 ;) ... { printf("hello"); ... } getch(); }

1 Answers  


Please write me a program to print the first 50 prime numbers (NOT between the range 1 -50)

5 Answers   IBM, KJH,


Categories