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

Answer Posted / jyoti

C++ was based on C and retains a great deal of the
functionality. C++ does not retain complete source-level
compatability with C. There are a few gotchas for C++
programmers trying to write C code, and C programmers trying
to compile with a C++ compiler.

Is This Answer Correct ?    8 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are namespaces in c++?

595


What is the prototype of printf function?

653


What are the two types of comments, and how do they differ?

574


Describe private, protected and public?

600


What is cin clear () in c++?

611






How can we read/write Structures from/to data files?

619


If a header file is included twice by mistake in the program, will it give any error?

550


What is c++ w3school?

634


What parameter does the constructor to an ofstream object take?

611


Why c++ does not have finally?

593


Explain container class.

687


which of the following is not an secondary constant a) array b) real c) union

1261


What is the advantage of c++ over c?

560


what are the events occur in intr activated on interrupt vector table

1180


What are the advantages of c++? Explain

597