Ummmm... hate to break this to ya.... but....
Code:
#include <stdio.h>
int main (void)
{
char input[10];
printf("enter userid :");
scanf("%s", input);
printf("string entered is %s\n\n" , input );
return 0;
}
==================
enter userid : freddie
string entered is freddie
Your code works.... so long as you don't put in more than 9 characters.
If you need more than 9 characters, make the input array bigger... input[64]; or such.
To limit the input to a safe 9 characters use scanf("%9s",input);
All this should be in the documentation for your compiler.