SyntaxFix
Write A Post
Hire A Developer
Questions
If the first character happens to be '\0', then you have an empty string.
'\0'
This is what you should do:
do { /* * Resetting first character before getting input. */ url[0] = '\0'; // code } while (url[0] != '\0');