Quote Originally Posted by eXeCuTeR View Post
why fputs(x, stdout);?
it gets 3 parameters and not 2, how is this possible?
Because fputs doesn't need to read into a buffer and therefore does not need to know the buffer length. It reads the string and writes all the characters in the string until it encounters the NUL char.

Quote Originally Posted by eXeCuTeR View Post
and why is my memory allocating is bad?
I mean, what if the user's name is Chris so not all the memory is used, only 5 byte of it and not 8.
Because you're not using it for anything. All you're using the local variable!

Quote Originally Posted by eXeCuTeR View Post
and why fgets(x, sizeof(x), stdin) - fgets(x, 8, stdin) is good either, isn't it?

and how do I make a warning is the input isn't a character?
Err, what is supposed to do?
For warnings, check compiler settings. You could tell what compiler you're using so someone can help.

Quote Originally Posted by ssharish2005 View Post
perhaps he should be usuing fputc()

ssharish
What's the point since obviously the entire string is written?