Variables: Difference between revisions

Content added Content deleted
Line 38: Line 38:


To declare an initialized string that won't be changed the following declaration may be used:
To declare an initialized string that won't be changed the following declaration may be used:
<lang c>char * mytext = "The C Language";</lang>
<lang c>const char * mytext = "The C Language";</lang>
There are more rules regarding arrays, variables containing pointers, dynamic allocation,
There are more rules regarding arrays, variables containing pointers, dynamic allocation,
and initialization that are to extensive to cover here.
and initialization that are to extensive to cover here.