[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c

Re: I need help

janus

5/14/2011 6:42:00 PM

So, where and where could one use string's read-only memory?

Janus
1 Answer

Shao Miller

5/14/2011 7:53:00 PM

0

On 5/14/2011 1:42 PM, janus wrote:
> So, where and where could one use string's read-only memory?

When you are only reading the elements which constitute the string.

For example, a function like 'printf' is declared like
this[n1256.pdf:7.19.6.3p1]:

int printf(const char * restrict format, ...);

The 'const' here shows that any pointed-to 'char' will not be written
to; read-only.