What is the difference between Class and Structure?

Answer Posted / riyaz

Class Can be abstract but structure can't
Class support inheritance but sturcutre can't
Class allows modifiers such as public,private but structure by default allow public
Class can used for huge amount of data, structure is for limited amount of data

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please explain class & object in c++?

610


Do vectors start at 0 c++?

537


What is doubly linked list in c++?

641


Why do we use structure in c++?

580


Write a program in C++ for Fibonacci series

666






Eplain extern keyword?

567


What are shallow and deep copy?

603


How can you create a virtual copy constructor?

589


What is iterator in c++?

624


What's the hardest coding language?

579


Is dev c++ a good compiler?

532


Why is standard template library used?

589


Why namespace is used in c++?

609


Write a struct time where integer m, h, s are its members?

527


What is & in c++ function?

597