473,883 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c can protect the data in struct

c language can protect the data in scopes private,protect ed and
public(may be) in structure and union?
Feb 27 '08 #1
6 2265
satheesh wrote:
c language can protect the data in scopes private,protect ed 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************ *************** *******@u10g200 0prn.googlegrou ps.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,protect ed 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,protect ed 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...@b urditt.org (Gordon Burditt) wrote:
clanguagecan protect the data in scopes private,protect ed 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,protecte d 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
384
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 intends to protect IL code. However, many .NET applications use data binding in UI forms. For example: Employee e = new Employee();
11
3376
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? Thanks Mike
15
5095
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 that i could retrieve my code from my applications after i compile it so i need to know to prevent this from happening to my applications Thanx in advance
3
4111
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. 1. I have very much data to be incorporated into the executable file. I have to add much data into my developed program into 2 Combo Boxes and 1 List Box control. For that i have created an xml element with all of the
31
7784
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
5839
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 would be much appreciated. Thanks in advanced.
8
2252
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 data and I can not begin with selling process with protection like that. What I should do, is there some example of encryption data within db
3
5097
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 (Java). It stores character strings, and resizes itself to accommodate new strings when needed. Interface: ----------
3
4405
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? On Windows Vista, if file encryption is used, Windows suggests to back up the key. If I import the key on another PC, then can I decrypt a data protected by the Protect() method? Or it is impossible by any means?
0
9945
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10863
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7978
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7136
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5807
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4622
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3241
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.