Neckruin
Joined: 17 Jan 2006 Posts: 66
|
Where are constants allocated depending on how you use them? |
Posted: Fri Oct 20, 2006 6:04 am |
|
|
Hello All,
I have a little little question.
Let's imagine this two pieces of code:
Code: | printf(lcd_putc, "THIS IS A CONSTANT STRING"); |
Code: | const char String[] = "THIS IS A CONSTANT STRING";
printf(lcd_putc, "%s", String); |
The result will be the same but, in the second case I'm sure the string will be allocated in Program Memory, but... where is the string allocated in the first case????
Thanks in advance,
Juanma |
|