1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2025-05-31 08:31:41 +05:30

freadln.c: test: print input string length

This commit is contained in:
2024-04-07 23:51:18 +03:00
parent 9296a74fb9
commit 8a3e4ba31f

View File

@ -143,7 +143,8 @@ int main(void) {
perror("freadln"); perror("freadln");
return EXIT_FAILURE; return EXIT_FAILURE;
} }
printf("Input string: '%s'\n", line); printf("Input string: '%s' (%" PRIuSIZE " characters)\n", line,
(SIZE_T_FORMAT) strlen(line));
// file test // file test
#define TEST_FILE "freadln_test.txt" #define TEST_FILE "freadln_test.txt"