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

Answer Posted / shakti singh khinchi

In C, structures never support constructors and destructors
whereas C++ supports both of them.

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is virtual base class uses?

725


What is c++ good for?

593


What is namespace & why it is used in c++?

613


What is implicit pointer in c++?

612


What do you mean by function and operator overloading in c++?

619






What is the difference between public and private data members?

673


How do you flush std cout?

583


What is the best free c++ compiler for windows?

596


Explain terminate() and unexpected() function?

634


Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.

2100


If dog is a friend of boy, is boy a friend of dog?

581


If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?

558


Why do we learn c++?

539


Can member data be public?

605


How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?

591