I\'m writing a very small program in C that needs to check if a certain string is empty. For the sake of this question, I\'ve simplified my code:
#include
First replace the scanf() with fgets() ...
scanf()
fgets()
do { if (!fgets(url, sizeof url, stdin)) /* error */; /* ... */ } while (*url != '\n');