how to intialize char array to list directly