working code for accessing string global variable as array
fixed (apparently) the accessing a pointer global variable