| Post Reply | RetroFed Forum Forum Index » C Programming Language |
| Author | Message | ||
|---|---|---|---|
printf("%s", name);
piefed.blahaj.zone
akunohana@piefed.blahaj.zoneJoined: 2026-03-30 |
I was experimenting with Is there anything else that I could learn/take away here, or was this a waste of time? 😅 The various results are commented next to the respective loops.
|
||
| 5 Original | |||
|
CameronDev
programming.dev
CameronDev@programming.dev Joined: 2023-06-18 |
There are a lot of inconsistencies with C functions, so important to check the man pages so you can handle them correctly. Your call to getchar isn't quite correct either, pressing the |
||
| 3 | |||
printf("%s", name);
piefed.blahaj.zone
akunohana@piefed.blahaj.zoneJoined: 2026-03-30 |
man scanf: RETURN VALUE On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure. man getchar: RETURN VALUE fgetc() and getchar() return the character read as an unsigned char cast to an int or EOF on end of file or error. There are a lot of inconsistencies with C ...
Ah, forgot about those. Thanks! On Linux, I read man pages all the time. Need adopt that same rutine. Regarding
|
||
| 2 | |||
| Post Reply |
Back to top |