C PROGRAMMING: String size= 60. Max limit in fgets = 80. Entered more than 80 chars. 79 were printed. But how did 79 chars store in string of size 60? [closed]

If string size is 60, why fgets can have limit as 80. And 79 characters were printed too. What exactly happened here?

Mar 9, 2025 - 18:53
 0
C PROGRAMMING: String size= 60. Max limit in fgets = 80. Entered more than 80 chars. 79 were printed. But how did 79 chars store in string of size 60? [closed]

If string size is 60, why fgets can have limit as 80. And 79 characters were printed too. What exactly happened here?

program that I wrote