char a[] = \"hello\";
My understanding is that a
acts like a constant pointer to a string. I know writing a++
won\'t work
I think this answer here explains "why" it's not a good idea;
It's because array is treated as a constant pointer in the function it is declared. There is a reason for it. Array variable is supposed to point to the first element of the array or first memory instance of the block of the contiguous memory locations in which it is stored. So, if we will have the liberty to to change(increment or decrement ) the array pointer, it won't point to the first memory location of the block. Thus it will loose it's purpose.