Skip to main content

Timeline for First C program - Tic Tac Toe

Current License: CC BY-SA 4.0

7 events
when toggle format what by license comment
Oct 29, 2021 at 13:38 comment added chux @BobTheCoder For this game, I'd exit with a message about the early ending. With a proper change to int main(), I'd also exit with a return code of EXIT_FAILURE vs. the usual EXIT_SUCCESS.
Oct 29, 2021 at 13:33 comment added BobTheCoder I really don't know what to do the only thing that I can think of is to use goto and exit the function or just recall the function, what would you recommend ?
Oct 29, 2021 at 13:26 comment added chux @BobTheCoder NULL is returned when there is no more input (or rare input error). NULL is not an input. Without the if(), code lacks this detection. What would you want code to do after fgets() and nothing was read?
Oct 29, 2021 at 12:52 comment added BobTheCoder fgets(buf, sizeof buf, stdin) == NULL is there a way for the someone to input NULL ? what would happen if I remove the if() will it have any affect on the program ?
Oct 22, 2021 at 12:46 history edited chux CC BY-SA 4.0
added 57 characters in body
Oct 22, 2021 at 12:32 history edited chux CC BY-SA 4.0
added 57 characters in body
Oct 22, 2021 at 12:24 history answered chux CC BY-SA 4.0