I think this should answer your first question. I'll take a longer look at the second part soon (if nobody else beats me to it).
We've tried
Code:
int noofsteps = 35;
char TopMessage[]
char BotMessage[] = " Hear me roar "
sprintf(TopMessage, "%d", noofsteps);
But depending on the combination of "'s, ;s and )s we just get %d displayed on the screen, or the compiler fails to build as we're changing variable type from integer to character.
If you don't specify a size for TopMessage, and don't provide an initializer, it defaults to size 1. Your also missing a couple semicolons. Try this:
Code:
char TopMessage[11];
char BotMessage[] = " Hear me roar ";
sprintf(TopMessage, "%d", noofsteps);