S
satheesh
c language can protect the data in scopes private,protected and
public(may be) in structure and union?
public(may be) in structure and union?
satheesh said:c language can protect the data in scopes private,protected and
public(may be) in structure and union?
No it can't. It can be hidden from direct access from an outer scope or
from another translation unit, but nothing anywhere in a C program's
address space can be absolutely protected from any other part of
itself.
Maybe you can clarify your question?
yes.
c++ having the data abstraction like protect, private.
c structure writes with protect, private also.
example:
struct bio
{
protect int a,b;
public:
void read()
void display()};
what is the different between the c structure's protected, private and
c++ class's protected, private.
satheesh said:yes.
c++ having the data abstraction like protect, private.
c structure writes with protect, private also.
example:
struct bio
{
protect int a,b;
public:
void read()
void display()
};
what is the different between the c structure's protected, private and
c++ class's protected, private.
satheesh said:i studied in trichy LINSOFT. He teach this program.
i studied in trichy LINSOFT. He teach this program.
satheesh said:c language can protect the data in scopes private,protected and
public(may be) in structure and union?
satheesh said:yes.
c++ having the data abstraction like protect, private.
c structure writes with protect, private also.
example:
struct bio
{
protect int a,b;
public:
void read()
void display()
};
what is the different between the c structure's protected, private and
c++ class's protected, private.
public(may be) in structure and union?
No. There are no scopes private, protected and public inC.
You are looking for C++. And C++ cannot really protect (as in
prevent access) either. The protection only works if everyone obeys
the rules. All you have to do is invoke the wrath of undefined
behavior, often by loading up a pointer with something illegal, and
then using it.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.