I'm currently a beginner in C programming and I'm having doubts about using "goto" to check if the user's string is accepted but I hear a lot of people say "goto" is bad programming.
Currently I'm using "goto" after the "if" check to go back to the "gets" command so the user can type again.
printf("Full Name: ");
NAME:
gets(name);
if (strlen(name) == 0)
{
printf("Empty name. Try again: ");
goto NAME;
}
Is there a better way to do this other than using "goto" or in this case this is not so bad to use it?