Just keep it as a string, if you want it to print the 'a' too.
Unless you mean you want it to reject the input...
printf("%s is your number\n", buffer);
I think that will do what you want... If you want it to reject invalid input.
int i = 0;
int l = strlen(buffer);
while(i != l)
printf("Enter a number: ");
for(i = 0; i < l; i++)
i = l + 1;
// Sorry, was typing during your second post... Don't know of another way..