a simple char array print function