It doesn't matter if the mindfuckery is intentional or not. Oldie but goldie here, you might know it already:
void ( *( *f[] ) () ) ();
It doesn't matter if the mindfuckery is intentional or not. Oldie but goldie here, you might know it already:
void ( *( *f[] ) () ) ();
Other urls found in this thread:
github.com
c-faq.com
web.archive.org
stackoverflow.com
twitter.com
I saw that code in a pdf screenshot posted here a few months ago. Don't remember what it is.
What does this do? C is so stupid man
Clets, when will they ever learn?
>grammars exist
>dude c is so stoopeed rust ftw
Declares f as array of pointer to function returning pointer to function returning void.
>being this defensive
Who hurt you?
>projecting
f is an array of pointers to function(s) of no arguments returning void
not hard at all
#define __is_constexpr(x) \
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
This one is my favorite, one of the best hacks in the linux kernel. Stack Overflow explanation here stackoverflow.com
int x = 0;
int i = 0;
switch(x) {
for (; i < 5; ++i) {
printf("This is fine.\n);
case 0:
printf("You can switch into a loop just like a goto.\n);
}
default:
break;
}
wut
he's hidden his case statement inside a for loop, so it prints "This is fine" and, as long as x = 0; "You can switch..." until i = 5. If i follow correctly.
switch(x) jumps to the case 0: label which happens to be inside a loop.
So, "You can switch" is printed first. After that the loop is executed 5 times.
#include
int main(){
printf("Hello world.\n");
return 0;
}
Still confuses me.
*stdio.h
*studio.h
>studio.h
Are you retarded?
Retard spotted
sussudio.h
>being this new
>void ( *( *f[] ) () ) ();
Quite useful with callbacks in pure C tbqh, well you use linkedlists instead though usually
so this would be what you use to declare event in C# in example
*(int *)&"%'\0\0"
I'm not proud, but I put this in a recent program of mine