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 friend classes? What are advantages of using friend classes?

831


What is a volatile variable in c++?

971


What is c++ & why it is used?

787


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

777


Write a program which uses functions like strcmp(), strcpy()? etc

829


Can we distribute function templates and class templates in object libraries?

784


write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;

1704


What is the use of setprecision in c++?

720


By using c++ with an example describe linked list?

788


What is a rooted hierarchy?

865


What is protected inheritance?

790


What are shallow and deep copy?

826


What is c++ similar to?

821


What do you mean by public protected and private in c++?

778


What are the various arithmetic operators in c++?

782