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

Write my own zero-argument manipulator that should work same as hex?

574


Why do we need function?

597


List the types of polymorphism in c++?

620


To what does “event-driven” refer?

606


What is the best ide for c++?

563






What is exception handling? Does c++ support exception handling?

583


What is a singleton class c++?

540


Explain rethrowing exceptions with an example?

604


What is the difference between strcpy() and strncpy()?

606


what is a class? Explain with an example.

615


Out of fgets() and gets() which function is safe to use and why?

723


what are Operators and explain with an example?

702


Describe new operator?

614


Can you pass an array to a function in c++?

537


What is the use of map in c++?

601