Understanding and Using C Pointers by Richard Reese

Understanding and Using C Pointers by Richard Reese

Author:Richard Reese
Language: eng
Format: epub, pdf
Tags: COMPUTERS / Programming Languages / C
ISBN: 9781449344177
Publisher: O’Reilly Media
Published: 2013-05-01T16:00:00+00:00


char header[32];

A pointer to a character is illustrated below. Since it has not been initialized, it does not reference a string. The string’s length and location are not specified at this time.

char *header;

The String Literal Pool

When literals are defined they are frequently assigned to a literal pool. This area of memory holds the character sequences making up a string. When a literal is used more than once, there is normally only a single copy of the string in the string literal pool. This will reduce the amount of space needed for the application. Since a literal is normally considered to be immutable, it does not hurt to have a single copy of it. However, it is not a good practice to assume there will only be a single copy or that literals are immutable. Most compilers provide an option to turn off string pooling. When this happens, literals may be duplicated, each having their own address.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.