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

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

608


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

602


What is enum class in c++?

702


Why are pointers not used in c++?

625


How do I run a program in notepad ++?

594






Which programming language should I learn first?

572


What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random

647


What are the types of array in c++?

616


Why cout is used in c++?

561


What is meant by a delegate?

604


Specify different types of decision control statements?

352


Which programming language is best to learn first?

579


Does c++ support exception handling?

589


What is insertion sorting?

659


Explain what you mean by a pointer.

621