What is the Difference between "C structure" and "C++
structure"?

Answer Posted / ranjeet garodia

In C++, structure behaves like class like can add function,
and can use properties on class as inheritance, virtual,
etc.
while in C, structure we can have only data member but not
functions.

Is This Answer Correct ?    57 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is virtual base class?

762


What is called array?

809


How static variables and local variablesare similar and dissimilar?

817


What is flush programming?

779


What are the five basic elements of a c++ program?

841


Why do we use pointers in c++?

778


Difference between strdup and strcpy?

884


What are the types of pointer?

786


What is pair in c++?

807


Define pure virtual function?

744


What is data binding in c++?

716


How do you flush std cout?

830


How can you say that a template is better than a base class?

793


What is class invariant in c++?

962


What is name hiding in c++?

877