Login
Remember
Register
CodersEditor Q&A
Online IDE
Questions
Unanswered
Tags
Users
Ask a Question
Programming Tutorials
Ask a Question
Can we use access specifiers to achieve data hiding in C++?
0
votes
asked
Jan 22, 2021
by
abitha
(
1.6k
points)
programming-languages
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 22, 2021
by
Inba
(
1.1k
points)
selected
Jan 22, 2021
by
abitha
Best answer
Yes, anything inside Private and Protected cannot be accessed by external functions. Even when inheritance they don't get inherited. So access specifiers help in achieving data hiding.
Please
log in
or
register
to add a comment.
Welcome to CodersEditor Q&A, where you can ask questions and receive answers from other members of the community.
239
questions
203
answers
2
comments
692
users
Related questions
Can we have a String primitive data type in C++?
Can we call C++ OOPS and Why?
What are different storage class specifiers in C?
Define access specifier and its various types in C++
What is singleton class in Java and how can we make a class singleton?
...