473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

c can protect the data in struct

c language can protect the data in scopes private,protected and
public(may be) in structure and union?
Feb 27 '08 #1
6 2239
satheesh wrote:
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?

Feb 27 '08 #2
i studied in trichy LINSOFT. He teach this program.
Feb 27 '08 #3
On Wed, 27 Feb 2008 08:00:34 -0600, satheesh wrote
(in article
<8b**********************************@u10g2000prn. googlegroups.com>):
i studied in trichy LINSOFT. He teach this program.
"He" is wrong. C does not have these features. Compiling code that is
/claimed/ to be C with a C++ compiler doesn't make it true.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Feb 27 '08 #4
satheesh wrote:
c language can protect the data in scopes private,protected and
public(may be) in structure and union?
C has no "private" or "protected" or "public" scope.
Are you thinking of some other language?

--
Eric Sosman
es*****@ieee-dot-org.invalid
Feb 27 '08 #5
>c language can protect the data in scopes private,protected and
>public(may be) in structure and union?
No. There are no scopes private, protected and public in C.

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.

Feb 28 '08 #6
On Feb 28, 9:22*am, gordonb.6e...@burditt.org (Gordon Burditt) wrote:
clanguagecan protect the data in scopes private,protected and
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.
In C There is no Private, Public,protected so there is no case of
protection.
in C++ There is Private ,Public Protected. If you follows rules it is
protected . if you are not following you still can access Private Data
even in C++.
Mar 12 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: YK | last post by:
All, What is the best way to protect IL code? --------------------------------------------------- Typical scenario: Visual Studio .NET 2003 includes Dotfuscator Community Edition, which...
11
by: siliconmike | last post by:
Is there a way to protect data files from access by root ? I have a data-centered website and would like to protect data piracy from any foot-loose hosting company employee. Any ideas? ...
15
by: Fady Anwar | last post by:
Hi while browsing the net i noticed that there is sites publishing some software that claim that it can decompile .net applications i didn't bleave it in fact but after trying it i was surprised...
3
by: SpIcH | last post by:
Hi All, This is all about protecting my data in Executable file. I have developed a program in Visual Basic .NET 2002. I have many questions in mind... please help me to complete my project. ...
31
by: aarklon | last post by:
Hi all, this is a question which i saw in a book typedef struct mall_li_header_ { int refcnt; uchar pool; uchar flag; ushort magic_no; char data;
22
by: teejayem | last post by:
Hi, I am new to programming with databases and was wanting some help. Is there any way to password protect an access database and access sent sql commands to it via vb.net code? Any help...
8
by: Mike | last post by:
Hi, If protect MS Access with password it doesn't mean to much. On internet, we can find plenty tools for opening forgotten passwords etc. I have a small c# aplication wit large amount of...
3
by: jacob navia | last post by:
Abstract: Continuing the discussion about abstract data types, in this discussion group, a string collection data type is presented, patterned after the collection in C# and similar languages...
3
by: Sin Jeong-hun | last post by:
It seems like the Protect() uses the Windows accout information to encrypt data. If I know the user name and the password, can I decrypt it on another PC? If it is not, how about the exported key?...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.