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

What is a tuple c++?

550


What is the oldest programming language?

570


Can you use the function fprintf() to display the output on the screen?

670


How do you clear a set in c++?

605


Define a constructor?

593






What is nested class in c++?

522


How can I learn c++ easily?

624


Explain the use of this pointer?

640


Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c

803


How does a C++ structure differ from a C++ class?

628


What is general format for a prototype?

601


What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero

641


What is the size of a vector?

582


What is implicit conversion/coercion in c++?

657


What is a c++ object?

618