Home > Back-end >  C language files.. For help
C language files.. For help

Time:11-19

Why this number five columns, isn't it, read the use is 11, 11 is not get 10 columns, why? And finally the output code there is no return, why can output the enter?

CodePudding user response:

Line 11 is a maximum number of characters (including the null character)
You can take the 11 to 6, and see if I can output the complete digital map

CodePudding user response:

Bosses, for help

CodePudding user response:

,,,,,,,,

CodePudding user response:

Focuslight
reference 1 floor response:
11 is a line of maximum number of characters (including the null character)
You can take the 11 to 6, and see if I can output the complete digital map

To 6, the output number is not complete

CodePudding user response:

reference 4 floor weixin_45780942 response:
Quote: reference 1st floor focuslight response:
11 is a line of maximum number of characters (including the null character)
You can take the 11 to 6, and see if I can output the complete digital map

To 6, the output of digital is incomplete

If the fgets the second parameter is 6, then read in s is 5 valid characters, need to take into account also should account for a character '\ 0' position;
Not clear whether the two characters of a place, so use '\ 0' is 11. Suggest use the length of 7, 9 to read, see if complete ~
  • Related