What is the difference between Class and Structure?

Answer Posted / sharad

in c++ structure and class are same. we can use the
structure in place of class for creating the object. but
the difference is only the default access specifier of the
class is private and public of the structure.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why should we use null or zero in a program?

600


What does it mean to declare a member variable as static?

612


C is to C++ as 1 is to a) What the heck b) 2 c) 10

637


What is the difference between a baller and a reference in C++?

576


What are the various access specifiers in c++?

600






What are dynamic type checking?

614


What is a c++ map?

659


What is an adaptor class in c++?

598


Why do we use setw in c++?

641


What are guid?

685


Can you please explain the difference between using macro and inline functions?

525


Explain the concept of dynamic allocation of memory?

617


What is the return value of the insertion operator?

601


You want to link a c++ program to c functions. How would you do it?

539


What are member functions used in c++?

554