473,389 Members | 1,074 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,389 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 2241
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.