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

Answer Posted / supriya

Memory is alloated on Stack using Structure whereas in class its heap , that is it wont be stored at an contagious memory location.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe about storage allocation and scope of global, extern, static, local and register variables?

730


what are the iterator and generic algorithms.

1480


What are the advantages of using typedef in a program?

640


What is the full form of ios?

553


What are the types of container classes?

614






What is token c++?

576


What are manipulators used for?

606


What are register variables?

644


Describe the process of creation and destruction of a derived class object?

642


What are the two main components of c++?

590


What is class in c++ with example?

568


What is the role of C++ shorthand's?

675


What is a c++ map?

659


Write about the scope resolution operator?

613


What's the order in which the local objects are destructed?

840