Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to define a variable as read-only in C language?

Status
Not open for further replies.

desaipa

Member level 2
Member level 2
Joined
Jan 20, 2005
Messages
53
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Location
india
Activity points
487
need help about c

plz can any one tell how to define a veriable as read only in c programming
 

Re: need help about c

hi

when a variable is declared as int char or float, it can change values.

but when u add "const" to any of them they r not going to change value if initilized.
 

Re: need help about c

Using "const" keyword you can perfom read only operation. Bcoz once initialized its value won't changes
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top