What is the difference between Class and Structure?

Answer Posted / lucky

1) classes can have data member as well as member function but structure is a data type which can have data member only.

Is This Answer Correct ?    40 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why cout is used in c++?

559


What is else if syntax?

669


Differentiate between a constructor and a destructor in c++.

558


What is fixed in c++?

580


What is the difference between #define debug 0 and #undef debug?

635






What does #define mean in c++?

604


To which numbering system can the binary number 1101100100111100 be easily converted to?

602


What are member functions used in c++?

547


What does new do in c++?

631


Is c++ a difficult language?

570


Describe the role of the c++ in the tradeoff of safety vs. Usability?

707


What are the five basic elements of a c++ program?

573


What is c++ & why it is used?

583


How many namespaces are there in c++?

556


How do you flush std cout?

560