> char b[21];
> fgets(b,22,thes)
Your problem IS buffer overflow, not merely some minor inconvenience you can fix later.
Lying to fgets about the size of your buffer is no better than using gets().
> char b[21];
> fgets(b,22,thes)
Your problem IS buffer overflow, not merely some minor inconvenience you can fix later.
Lying to fgets about the size of your buffer is no better than using gets().
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.