yes... you should use fgets() instead because it's buffer safe...
char buffer[256];
prinf("type something\n");
fgets(buffer,255,stdin);
printf("You entered %d characters\n",strlen(buffer));
The advantage is that only the first 255 characters are loaded into the buffer... with gets() you could easily overflow a small buffer causing memory access violations.