What is the difference between class and object?
Answers were Sorted based on User's Feedback
Answer / neha
classes and objects are seprate but related concept.every
object belong to a class and every class contains one or
more objects.
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / suvarna handore.
Class is a basic entity which allow to combine data and
manipulators. In class definition we need to club data
members and member functions.The usability of structure and
function together in C++ is known as class.
Objects are the basic runtime entities. Object is an
instance of class.To access data members and member
functions within classes, objects are required. We can
access data from outside the class using objects.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / johncz
Class is a template for the custom type that can be used as
variable. It defines types of data that class contains and
the set of functions to manipulate those data types. It is
just a recipe to be used when class is instantiated.
Object is an entity created using class template. Such an
object occupies computer’s memory. Each object of the class
is independent entity.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kanchi
class is the advance version of structure because it contains the data and functions both so it is wrapped into a single unit called encapsulation.
Object is the instance of class and it always created at run time
Is This Answer Correct ? | 0 Yes | 0 No |
What is a class oop?
Program to read a comment string
Templates mean
#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort
How do you answer polymorphism?
How to calculate the age from the date of birth by using the program?
Difference between over loading and over ridding?
12 Answers CTS, Patni, Softvision Solution,
Tell us about yourself.
47 Answers ABB, Amazon, Fidelity, Flextronics, Franklin Templeton, HCL, Hexaware, IBM, Impetus, Infosys, Reliance, Rofous, Silgate, Sutherland, TCS, Thomson Reuters, Virtusa, Wipro,
What are the access specifiers avaible in c++?
Difference between vector and array
why reinterpret cast is considered dangerous?
what is oppes