Hello. In the code below, foo is a pointer that points to the first element of "hello", which is 'o'. Then how can foo[4] be valid? I don't understand why foo also points to a sequence of characters.
(2)
Using square brackets (what you did on line 5) is syntactic sugar for a combined pointer offset and indirection (what you did on line 4). That is, the two lines are identical.
It is also why arrays are conveniently numbered from zero.