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
List some of the dynamic data structures in C?
Explain what is gets() function?
What is pragma in c?
What is the difference between typedef struct and struct?
Explain about block scope in c?
Explain b+ tree?
Write programs for String Reversal & Palindrome check
Why & is used in scanf in c?
What is a buffer in c?
What is the difference between array_name and &array_name?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What is the heap?
in iso what are the common technological language?
What are header files and explain what are its uses in c programming?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......