I recently met following statement:Is there any paticular reason of not making that array external to the function? And how is const created inside function, is it put on stack as any normal variable but has 'const' attributes?Code:void func(void) { const unsigned char *const tab[]= { "Str1", "Str2", "Str3" }; /* some code that uses strings form array */ }
I do code in embedded world and this is essential for me as in 'my' world const means FLASH and variable is in SRAM. Therefore, I do not understand how all of sudden when a function is called it creates const .... in FLASH - how??