Timeline for Create output twice the length of the code
Current License: CC BY-SA 3.0
24 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | Community Bot |
Commonmark migration
|
|
| May 24, 2017 at 0:39 | comment | added | sergiol | Couldn't you have less letters in title style? GRRRRRR... | |
| Apr 13, 2017 at 12:39 | history | edited | Community Bot |
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
|
|
| Feb 26, 2017 at 8:34 | history | edited | Albert Renshaw | CC BY-SA 3.0 |
added 147 characters in body
|
| Jan 27, 2017 at 6:51 | history | edited | Albert Renshaw | CC BY-SA 3.0 |
deleted 39 characters in body
|
| Jan 27, 2017 at 6:50 | comment | added | Albert Renshaw | @Titus creates nonsense on my IDE, but said nonsense is indeed 50 bytes. Editing now, thanks | |
| Jan 27, 2017 at 6:40 | comment | added | Titus |
Can´t You use %50d?
|
|
| Oct 7, 2015 at 7:40 | comment | added | Albert Renshaw | @MichaelS Ah sorry haha, they suggested I add "Main(){}" and I did and forgot to adjust that number as well to fit the new length, rookie mistake lol — fixed it now! | |
| Oct 7, 2015 at 7:40 | history | edited | Albert Renshaw | CC BY-SA 3.0 |
added 16 characters in body
|
| Oct 7, 2015 at 7:21 | comment | added | MichaelS | This compiles for me in Visual Studio Community 2013 using a C++ project and adding the above code to source.c with no other files, and runs from the Windows command prompt. As mbomb007 points out, 27*2!=38. However, 27*2=54, which can be achieved by changing the '%0.36' to '%0.52' with no change in code length. | |
| Oct 6, 2015 at 11:41 | comment | added | Peter |
Well that's easily fixed. Change the 6 to a 7 and add a . after the 0.
|
|
| Oct 6, 2015 at 11:31 | comment | added | anatolyg |
@Peter The undefined behavior here is not because of an implicit declaration - it's because of trying to extract double from a va_list which contains an int.
|
|
| Oct 6, 2015 at 8:28 | comment | added | Peter | @Zereges. This code does not exhibit undefined behaviour. The "implicit declaration" and "implicit return type" features are deprecated in recent standards, but their usage is still permitted and results are well defined. There are circumstances in using such features causes undefined behaviour, but this code does not involve those. | |
| Oct 5, 2015 at 18:27 | comment | added | mbomb007 | Note that 27*2 != 38. | |
| Oct 5, 2015 at 11:49 | comment | added | Zereges | @AlbertRenshaw Also, I do not think it works here. | |
| Oct 5, 2015 at 11:43 | comment | added | Zereges | @anatolyg From what you've posted, it seems, that it is undefined behaviour. So I would recommend adding at least one compiler, which handles this correctly as well as explanation, that this is UB. See this link. | |
| Oct 5, 2015 at 7:59 | comment | added | Albert Renshaw | @anatolyg Thanks for the reference :D | |
| Oct 5, 2015 at 7:58 | comment | added | Albert Renshaw | @ryvnf Thanks, good point! Got it in. :) | |
| Oct 5, 2015 at 7:55 | history | edited | Albert Renshaw | CC BY-SA 3.0 |
added 8 characters in body
|
| Oct 5, 2015 at 7:42 | comment | added | anatolyg |
@Zereges No, C has the "implicit declaration" rule that usually lets you use stuff without the proper #include. The compiler will emit a warning, and it will sometimes crash, but it will usually work.
|
|
| Oct 5, 2015 at 7:36 | comment | added | Zereges |
But you have to #include <stdio.h>, right?
|
|
| Oct 4, 2015 at 14:59 | comment | added | wefwefa3 |
I do not think that counts as a valid C program but main(){printf("%0.XXf",0);} works.
|
|
| Oct 3, 2015 at 10:10 | history | edited | rink.attendant.6 | CC BY-SA 3.0 |
syntax highlighting, removed redundancy
|
| Oct 3, 2015 at 2:12 | history | answered | Albert Renshaw | CC BY-SA 3.0 |