Only if you googled it…
char buf[11];
fgets(buf, sizeof(buf), stdin);
11 char = 10 char plus the terminating NUL.
2
solved read specific number of chars in c [closed]
Only if you googled it…
char buf[11];
fgets(buf, sizeof(buf), stdin);
11 char = 10 char plus the terminating NUL.
2
solved read specific number of chars in c [closed]