What is the difference between struct and class in C++?
A) all members of a structure are public and structures don't have constructors and destructors
B) members of a class are private by default and members of struct are public by default. when deriving a struct from a class/struct, default access-specifier for a base class/struct is public and when deriving a class, default access specifier is private.
C) all members of a structure are public and structures don't have virtual functions
D) all above
Correct Answer:
Verified
Q6: Which of the following data type does
Q7: How many objects can be created from
Q8: Which of the following statements is correct
Q9: What happens when a class with parameterized
Q10: Which of the following interface determines how
Q12: Predict the output of following C++ program#include<iostream>
Q13: class Test { int x;};int main(){Test t;
Q14: Which of the following is true?
A)all objects
Q15: Which of the following is true about
Q16: Which of the following is true about
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents