What is the difference between class and structure?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does enum stand for?

705


What is encapsulation process?

670


program for insertion ,deletion,sorting in double link list

2359


What do you mean by Encapsulation?

728


What is the main purpose of inheritance law?

766






What polymorphism means?

703


Which is not an object oriented programming language?

625


What is the oops and benefits of oops programming?

636


What is the difference between a constructor and a destructor?

707


Is data hiding and abstraction same?

662


What is polymorphism programming?

694


What is abstraction example?

699


Give two or more real cenario of virtual function and vertual object

1953


Is react oop?

708


Why do pointers exist?

758