totally agree with jerry ...
just need to add if you need the array as const then it should be declared/defined like this:
const char str[11]={'0','1','2','3','4','5','6','7','8','9',0 };
- but tis means that you can only read str[] on runtime !!!
if you want to change the content of str on runtime than it can not be const:
char str[1000]={0};
- this allows you to read/write access on runtime
beware that total size of your non const variables, stack and C/C++ language engine cannot exceed the target device RAM memory !!!
If it does then compiler usually throws some error...
but not always (sometimes stack is not fully accounted for)