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
What is a stl vector?
In what scenario does the Logical file and Physical file being used?
What is a list in c++ stl?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
What are the different types of stl containers?
What is a standard template library (stl)? What are the various types of stl containers?
What does stl stand for in basketball?
What is a standard template library (stl)?
What is meant by stl in c++?
What does stl mean in slang?
write a program that will accept a number and print.its equivalent in words the maximum input number is 9999
Why should a c++ programmer be interested in stl?
What is stl in c++ with example?
Is stl open source?
Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.