What are the differences between a struct in C and in C++?

Answer Posted / shakti singh khinchi

In C, structures does not support "virtual" mechanism like
virtual functions whereas C++ structures supports virtual
mechanism like classes.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why isn't sizeof for a struct equal to the sum of sizeof of each member?

540


What does count ++ do in c++?

693


Why cout is used in c++?

562


How do I write a c++ program?

596


What is scope resolution operator in c++ with example?

553






Can static member variables be private?

626


Can I learn c++ without knowing c?

589


How the endl and setw manipulator works?

558


Differentiate between structure and class in c++.

596


What do you mean by inheritance in c++?

602


What is the insertion operator and what does it do?

561


What are the 3 levels of programming languages?

533


Can we make copy constructor private in c++?

593


What is the keyword auto for?

571


What happens when the extern "c" char func (char*,waste) executes?

632