I was wondering what are the major differences between the variables.
And why I get garbage values when I try to print the values in "ptr[]"
the array way, but it's perfectly fine when iterate through the
vales. I can't seem to understand how my variable "ptr" can point to 5
characters, since it should only be able to point to one.

Note the double use of const in the expression const char* const ptr. The first means that the character values are constant, the second the pointer itself is constant. It is the latter that prevents writing ptr++, and losing your only handle to the address of the start of the string literal "12345".