I am using Turbo c++ compiler i created an char pointer line this



char *variable;
variable=new char;




and i was able to input and get back the data like an array say


variable[0]
variable[1]
variable[2]
variable[3]
.
.
.
.
variable[n-1]
variable[n]



So this is working like an dynamic array.. but why is this... i shouldnt be able tyo do this right.. since variable is a char and not a char array...... please help..