C language character screen function