Created
March 29, 2016 16:12
-
-
Save Toltar/ebcfc0300bf5a6936cb1 to your computer and use it in GitHub Desktop.
THE HOLY USER INPUT BLANK STRING CHECK!!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() | |
{ | |
char *buff; | |
size_t n; | |
size_t max = 40; | |
while(fgets(buff,max,stdin)) | |
{ | |
n = strlen(buff); | |
if( n==1 && buff[n-1] == '\n') | |
{ | |
printf("Empty string\n"); | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment