Limit fgets input to up to a certain number of characters
This would obviously be better as a function, so we can call with different parameters.
Instead of repeating the constant 12 in the fgets() call, we could simply use sizeof v.  Then it remains consistent if we change v.
Instead of strcspn() with only one character, I'd prefer strchr().  Conveniently, that returns a null pointer if not found, so we don't need to calculate the length to search.  And we shouldn't repeat the search to replace the newline with null character.
Error messages should go to stderr, not stdout.
We can skip the rest of line with a simple scanf(&quot;%*[^\n]&quot;) (note the * to suppress assignment).  That would replace the ch loop.