Difference between Structure and Class in C++?

Answer Posted / ashish raghuvanshi

Basically in C++ structure and class are same but with some
minor diffrences listed below:-
1. In classes all the members by default are private but in
structure members are public by default.
2. There is no term like constructor and destructor for
structs, but for class compiler creates default if you
don't provide.

Is This Answer Correct ?    79 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define stl.

1027


In what scenario does the Logical file and Physical file being used?

2543


write a program to convert a decimal number in to its equivalent binary number?

2270


what is template and type convertion

2217


What are the components of stl?

851


What is meant by stl in c++?

877


How connect plc and pc through software

2163


What are the various types of stl containers?

923


sir please send me bpcl previous question papers

2151


help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase

2133


What is a list in c++ stl?

886


What is a stl vector?

825


What are the symptoms of stl?

825


What is the stl, standard template library?

830


write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

2702