What is a class?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is union and structure?
Did c have any year 2000 problems?
What is the difference between exit() and _exit() function in c?
What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==you) printf("love c"); else printf("know c"); }
Write a program that receives as input a number omaadel-n-print, four digits.
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????
change to postfix a/(b+c*d-e)
code for replace tabs with equivalent number of blanks
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
write a c program to print "Welcome" without using semicolon in the whole program ??
Explain what is the benefit of using an enum rather than a #define constant?
write a program that uses point of sale system. which are mainly used by retail markets, where the is a database inventory list, a slip should be printed for the customer. manage should be able to access what has been sold and what is left from stock?