Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Programming
→
ASP Dot net Interview Questions in Programming
→
Explain the difference between class and struct in...
1.
Explain the difference between class and struct in C++?
Answer»
S.no
Class
Structure
1.
Members of Class are Private
Members of Class are Public
2.
Declared as Class
Declared as Struct
3.
Used for a more significant
AMOUNT
of Data
Used for a smaller amount of Data
4.
Supports Inheritance
Does not
SUPPORT
Inheritance
5.
The object is created on the Heap memory
The
OBJECTIVE
is
FORMED
on the
STACK
Memory
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
What do you mean by Vtable and VPTR in C++?
Explain the difference between Abstract class and Interface in C++?
What is copy constructor? Can we make copy constructor private in C++?
What do you mean by function overriding & function overloading in C++?
What do you mean by friend class & friend function in C++?
Explain the difference between new() and malloc() in C++?
What is constructor and destructor in C++?
What do you mean by inheritance in C++? Explain its types.
Explain the difference between realloc() and free() in C++?
What do you mean by overhead in C++?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies