Time:10-10
CodePudding user response:
or ch==32 ascll judgment can also directly
see how empty line defines the Only a carriage return line is, of course, So this line only eight Spaces count This line has two TAB count The fgets reads a line, whether all of the characters of this line is blank characters, namely the above said Spaces, TAB and press enter The fgets can get return in reading
for example Char c [256]; Char * p=gets (c, sizeof (c); Stdin);//here in the standard input, for example, can change to the file pointer if (p!=NULL & amp; & C [0]=='\ n') printf (" empty line ");
regular expression ^ \ s * $
Page link:https//www.codepudding.com/Backend/60343.html