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 Memory Allocation in C/C++ ?

643


Can a constructor be private?

590


What is capacity in vector in c++?

553


Why do we use iterators?

631


What are the uses of static class data?

647






What is the advantage of an external iterator.

584


Are c and c++ different?

553


What is the difference between the functions rand(), random(), srand() and randomize()?

739


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

687


What is an inline function in c++?

642


Is c++ fully object oriented?

560


Why is main function important?

591


How many types of modularization are there in c++?

569


What is the precedence when there is a global variable and a local variable in the program with the same name?

649


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

715