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 |
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What oops means?
What is strcpy() function?
Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0
write c program without semicolon
11 Answers MindTech, TCS, Wipro,
what is the difference between embedded c and turbo c ?
Write a simple program to find the size of different basic data types in C.
player is good if the following conditions are satisfied: He is either from “India”, “Japan” or “Korea” He has a minimum of 3 years of experience He has won at least 3 major tournaments, and one of them must be "World Championship Tournament". He must know more than 10 techniques. (but see next question) If he knows less than 10 techniques, then he must be a world champion. His name contains at least 3 words. For example "Sachin Tendulkar" will not meet this condition. Write a method: boolean isGoodPlayer(String name, String country, int yearsExperience, String[] majorTournamentsWon, String[] techniques, boolean isWorldChampion) name country yearsExperience majorTournamentsWon techniques isWorldChampion
What does calloc stand for?
int i=10; printf("%d %d %d", i, i=20, i);
What are the __date__ and __time__ preprocessor commands?
What is wrong with this program statement? void = 10;