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

How can you specify a class in C++?

783


What is oops in c++?

579


What is unary operator? List out the different operators involved in the unary operator.

574


Is c++ an oop?

579


Which software is best for programming?

648






What are special characters c++?

550


What is c++ good for?

570


Explain the difference between new() and malloc() in c++?

616


What is srand c++?

562


What is abstraction in c++ with example?

551


How long does it take to get good at leetcode?

646


What is the difference between a declaration and a definition?

570


What are the types of container classes?

604


Explain terminate() function?

579


Give an example of run-time polymorphism/virtual functions.

548