What is the difference between Class and Structure?
Answer Posted / anshu sharma
Structure are value types and classes are reference types.So
structures use stack and classes use heap.
Structures members can not be declared as protected , but
class members can be.
You can not do inheritance in structures.
Structures do not require constructors while classes require
Is This Answer Correct ? | 158 Yes | 54 No |
Post New Answer View All Answers
what are the decision making statements in C++? Explain if statement with an example?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
Search for: what is pair in c++?
what is a class? Explain with an example.
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
How do I tokenize a string in c++?
How many characters are recognized by ANSI C++?
What is difference between class and structure in c++?
Explain linear search.
What is function declaration in c++ with example?
Why do we need templates?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
In what situations do you have to use initialization list rather than assignment in constructors?
What is #include iostream in c++?
What is the best c++ book for beginners?