I'm pretty new to unix and I'm wondering how I would go about writing a word, letter by letter into my program's memory. So for example if my word was "cup", I'd want an array A to have A[0] = 'c', A[1] = 'u', A[2] = 'p'. I've tried looking this up but couldn't find anything clear enough, sorry if this is a stupid question but I just don't know what to do. I'm using BASH for this program.
At the end I plan on just making a loop to perform this task for me but I just need to find out how to actually create the array and write a character to each index.
I appreciate any help at all, thank you.