My problem is that the gets() function takes the whole input rather than staying to the limit. Here is what i do:
char c[10];
puts("User enter yoir name not more than 10 characters: ");
gets(c);
printf("%s", c);
But i can give any large input and it takes that
Input: Dushyant Kaushik
Output: Dushyant Kaushik