Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between class and structure?

Answers were Sorted based on User's Feedback



What is the difference between class and structure?..

Answer / guest

structure is a value type class is reference type,
struct Memory will be on stack and class Memory stored on
Heap,
struct not suports inheritance and class can?

Is This Answer Correct ?    18 Yes 2 No

What is the difference between class and structure?..

Answer / mohan

By default the members of struct are public.
By default the members of class are priavte.

When an object is created to a class, constructor will be
called automatically.
But not in struct (if structure having member function with
structure name)

Is This Answer Correct ?    15 Yes 0 No

What is the difference between class and structure?..

Answer / konankiswetha

class is a slow access because of heap memory. But struct
is a faster in access because of stack memory.



values are initialize at the time of declaration in class
but not in struct.

Is This Answer Correct ?    6 Yes 1 No

What is the difference between class and structure?..

Answer / arvind

The main difference is
Structure ... Class
struct . Class
{ . {
data members ... data members
} ... +
... Member functions
... }

We can't define Functions inside structure where as in class we can define inside

Is This Answer Correct ?    4 Yes 0 No

What is the difference between class and structure?..

Answer / chetan

struct initialize with keyword struct
class initialize with keyword class

Is This Answer Correct ?    2 Yes 0 No

What is the difference between class and structure?..

Answer / satish

1.class access data members and member functions but
structure access only data members
2.class supports constructor but structure does not supports.

Is This Answer Correct ?    2 Yes 1 No

What is the difference between class and structure?..

Answer / nandkumar

Class can be single tent.
but not in case of structure.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More OOPS Interview Questions

What is a class oop?

0 Answers  


What is differance between Abstract and Interface

3 Answers  


What type of loop is a for loop?

0 Answers  


what are abstract classes and how they impliment , with example

2 Answers  


What is destructor oops?

0 Answers  


i had specified the access specifier for abstarct class member like (pure virtual function) as private.But it can be accessed by the derived class.How the private member of one class is accessed by other class.if any body face this problem and found the solution plz reply to me.

1 Answers   Syntel,


WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP

2 Answers  


what are the disadvantages of C++?

25 Answers   ATS, Infosys, UNI, Wipro,


Templates mean

0 Answers  


What is an object?

14 Answers   HCL,


In multiple inheritance , to create sub class object , is there need to create objects for its superclasses??? in java and c++ both. Actually i have some information that is , all available members from its superclasses , memory created in subclass obj , so no need to create object for its superclasses...??? Thanks in Advance

1 Answers  


What do you mean by binding of data and functions?

3 Answers  


Categories