What is the difference between Class and Structure?

Answer Posted / amit

strucuter member function and variable are by defualt
public and class member varible and funtion are by defualt
private.
sructure can not inherited but class can .

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is c++ different from java?

563


What are namespaces in c++?

601


Why the usage of pointers in C++ is not recommended ?

900


What c++ is used for?

587


What do you mean by overhead in c++?

583






Is dev c++ a good compiler?

529


What are friend functions in C++?

624


What is c++ coding?

660


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

1841


What is c++ runtime?

659


What is the meaning of string in c++?

575


What is a multimap c++?

684


Why we use #include iostream in c++?

585


What is class syntax c++?

595


Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D

3064