The constant string within the function is assigned from the program static storage area. There is already a hidden when there is program compilation, and there is existence of the entire running period of the program. This concept must be clear because this allocation feature within the function is not obvious as the global variables and STATIC variables.
As in Example 1
Char * getString (Void)
{
Char * p = "Hello World";
Return P;
}
The "Hello World" here is stored in a static storage area, so it can be used as the return value.
In addition, you can use postMessage to deliver a string (of course, the transmission address), this is often used in the program.