Q. What is the difference between struct and class in C++?

C++ में स्ट्रक्चर और क्लास के बीच क्या अंतर है?

A
struct has public members by default, while class has private members by default
B
struct can have member functions, while class cannot
C
struct supports inheritance, while class does not
D
struct is only used for C programming

Explanation

Explanation will be available soon. Please stay tuned.

व्याख्या जल्द ही उपलब्ध होगी। कृपया बने रहें।

Invest in Future Achievers

Your support helps keep Exam Achiever 100% free for students preparing for exams.

Thanks for your support!

Comments

Leave a Comment