Thanks for the replies.
@Speedo does the pointer points to the first element of the array? The array itself its a pointer, right?

@VictorN I don't understand why you say my Implementation is wrong?