I'm working in C and I want to make a loop that will make my code keep asking for input until I input ""?
char inputarray[1000];
int size;
printf("\nEnter a string: ");
fgets(inputarray,1000,stdin);
size = strlen(inputarray);
printf("%d \n", size);
printf("%s \n", inputarray);
fgetsto see if an end-of-file or error condition occurred. For example, if standard input has been redirected to come from a file, then it is likely for an end-of-file condition to occur. However, this is not related to your problem, so you can ignore this advice for now.