Explain the difference between struct and class in terms of access modifier.



Explain the difference between struct and class in terms of access modifier...

Answer / Anjali Nayak

By default, members of a struct have public access, while members of a class have private access. This can be overridden by explicitly specifying the access modifier.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are proxy objects in c++?

1 Answers  


What is the full form of india?

1 Answers  


Explain the problem with overriding functions

1 Answers  


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

1 Answers   Cankaya University,


what are Operators and explain with an example?

1 Answers  


Are strings mutable in c++?

1 Answers  


What are the advantages of c++?

4 Answers  


Explain data encapsulation?

1 Answers  


Why Pointers are not used in C++?

1 Answers   Global Logic,


What are the main features of c++?

1 Answers  


Define upcasting.

1 Answers  


What is the Difference between "C structure" and "C++ structure"?

12 Answers  


Categories