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

Explain the use of virtual destructor?

611


Write a C++ Program to check whether a number is prime number or not?

624


Difference between a copy constructor and an assignment operator.

556


What are c++ tokens?

582


Why pointer is used in c++?

601






What is #include iostream?

727


. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?

2748


What is meant by entry controlled loop? What all C++ loops are exit controlled?

556


Who invented turbo c++?

593


Can class objects be passed as function arguments?

589


What is the use of c++ programming language in real life?

552


What's the hardest coding language?

566


When do we run a shell in the unix system?

553


Is it possible to pass an object of the same class in place of object reference to the copy constructor?

558


Is there finally in c++?

606