Let's make the hardest "Hello World" statement in C/C++
Let's make the hardest "Hello World" statement in C/C++
Other urls found in this thread:
stavros.io
twitter.com
>C/C++
Why are you grouping two completely different languages together?
Why did you post disgusting sepples garbage?
>2 completely different
C code is compatible in C++
No it's not, you idiot. It never was.
Wrong...
It was when I wrote with it in the 90's.
int *ptr = malloc(sizeof *ptr);
This is the idiomatic way of writing this is C, and has always been invalid C++.
>sizeof *ptr
puking anime girl.jpg
sizeof variable is objectively better than sizeof(type).
>his variables aren't the same size as the variable's type
Your sentence doesn't even make sense, but I assume you think that it's supposed to be sizeof ptr or something.
This is incorrect, since the size of an int * is not necessarily the same as the size of an int.
C/C++ = 1
Before this thread derails into sperglords arguing about language differences, here's a hello world using curve fitting:
stavros.io
static char str[] = "HELLO WORLD!";
for(int i = 0; "HELLO WORLD!"[i]; ++i)
{
putchar("HELLO WORLD!"[i]);
}
You ruined a perfectly good oppurtunity.
for(int i = 0; i["HELLO WORLD!"]; ++i) {
putchar(i["HELLO WORLD!"]);
}
I know, I know.
#include
template
class HW;
template
class HW { public: explicit HW(T t): C(t) {} virtual ~HW() { std::cout
#include
int main(){
printf("Hello, world!");
return 0;
}
updated
#define E explicit
#define V virtual
#define O override
#define PB public
#define PR private
#define CT std::cout
#include
int main()
{
char h[1024] = { 0 }; int w = 0;
h[w]
++; h[w]
++; h[w]
++; h[w]
++; h[w]
++; h[w]
++; h[w]
++; h[w]
++; h[w]
++; h[w]
++;
while (h[w])
{ w++; h[w]++; h[w]++; h[w]++; h[w]++;
h[w]++; h[w]++; h[w]++; w++; h[w]++; h[w]++; h[w]++; h[w]++;
h[w]++; h[w]++; h[w]++; h[w]++; h[w]++; h[w]++; w++; h[w]++;
h[w]++; h[w]++; w++; h[w]++; w--; w--; w--; w--; h[w]--; }
w++; h[w]++; h[w]++; putchar(h[w]);
w++; h[w]++; putchar(h[w]);
h[w]++; h[w]++; h[w]++; h[w]++; h[w]++; h[w]++; h[w]++; putchar(h[w]);
putchar(h[w]);
h[w]++; h[w]++; h[w]++; putchar(h[w]);
w++; h[w]++; h[w]++; putchar(h[w]);
w--; w--; h[w]++; h[w]++; h[w]++; h[w]++;
h[w]++; h[w]++;
h[w]++; h[w]++; h[w]++; h[w]++; h[w]++; h[w]++;
h[w]++; h[w]++; h[w]++; putchar(h[w]);
w++; putchar(h[w]);
h[w]++; h[w]++; h[w]++; putchar(h[w]);
h[w]--; h[w]--; h[w]--; h[w]--; h[w]--; h[w]--; putchar(h[w]);
h[w]--; h[w]--; h[w]--; h[w]--; h[w]--; h[w]--; h[w]--; h[w]--; putchar(h[w]);
w++; h[w]++;
putchar(h[w]);
w++; putchar(h[w]);
}
maybe i'll spend sometime to obfuscate it well
niggerlicious fucks, this is why i use HolyC
"Hello, World!";
>no newline
haha retard