Skip to main content
20 events
when toggle format what by license comment
Feb 26, 2017 at 9:54 comment added Ahemone @AlbertRenshaw I have now done so with 13 bytes at codegolf.stackexchange.com/a/111339/64644 . AbelTom, I'm sorry for polluting your comments by promoting my answer.
Feb 26, 2017 at 8:45 comment added Albert Renshaw @Ahemone can you post your 14 byte solution as an answer please? ʕ•ᴥ•ʔ
Feb 14, 2017 at 6:44 comment added Ahemone @AlbertRenshaw It's not something I'd rely on for portability but here are a couple of examples. I can't get it to work offline and it seems that it needs to be assigned to a non argument variable on TIO.. tio.run/nexus/…
Feb 14, 2017 at 5:13 comment added Albert Renshaw @Ahemone Could you provide a reference to this? I'm having a hard time reproducing this on any online C IDEs
Feb 14, 2017 at 4:42 comment added Ahemone @AlbertRenshaw While it's undefined and somewhat dependent on the calling convention the compiler uses and which registers used but from what I understand of GCC, on x86 at least, it will place any data it wishes to store in an offset position in memory in the same register as the return value so when the function exits with no explicit return the register designated to store the return value contains the last value that was stored somewhere in memory.
Feb 14, 2017 at 3:31 comment added Albert Renshaw @Ahemone I don't think that's considered output though?
Feb 13, 2017 at 12:06 comment added Abel Tom @Neil Thanks, will remember next time to leave the Ungolfed version clean.
Feb 13, 2017 at 12:05 history edited Abel Tom CC BY-SA 3.0
added 41 characters in body
Feb 13, 2017 at 10:52 comment added Neil Surely the ungolfed version should still have the int and spaces etc...
Feb 13, 2017 at 10:22 comment added Ahemone Lose the return and instead assign it with something like c+=!d
Feb 13, 2017 at 9:51 comment added Mika @Neil Haha that's okay! I wasn't even sure about it, you just confirmed. I only assumed it would work because it also does in C# :)
Feb 13, 2017 at 9:48 comment added Neil @Metoniem Huh, your comment didn't show up when I was commenting, sorry for stomping on you like that.
Feb 13, 2017 at 9:25 comment added Abel Tom @Neil You're right they were both unnecessary. Updated. Sorry I come from the clean-code club. :) Have to get used to golfing in C.
Feb 13, 2017 at 9:23 history edited Abel Tom CC BY-SA 3.0
removed space after `return` , removed return datatype int
Feb 13, 2017 at 8:53 comment added Neil Do you need the space after return? Do you need the int specification?
Feb 13, 2017 at 8:50 comment added Mika Not 100% sure but I think you can remove the space in your return, like return!c+d;
Feb 13, 2017 at 8:07 comment added Abel Tom @Pavel You're right, brackets were useless, updated!
Feb 13, 2017 at 8:06 history edited Abel Tom CC BY-SA 3.0
removed useless brackets
Feb 13, 2017 at 7:48 comment added Pavel Do you need () around !c+d?
Feb 13, 2017 at 7:43 history answered Abel Tom CC BY-SA 3.0