>There are people on /g/ right now who dont know what this code prints without compiling it
but it has pointers and shit i dont even
i cant even
Nice bait, but we aren't going to solve what the programmer made.
He want's to keep his job, so he makes it difficult for you to understand his code, thus making it nearly impossible for you to maintain his code.
Tell your boss that only the original programmer can maintain it and have a nice day.
Guess what this does OP
CAN YOU EH?
a[i] equals *(a+i). the name of the array is bascily &a.
So q will be the difference in bytes of the position of 2 and 1 in the array due to conversion to (void*). For example -4.
>unironically dealing with programming
>unironically knowing ANYTHING about it whatsoever
>not just visiting tech related spaces to hear about nice stuff to buy and some nerd shit to laugh at
got get a real degree with and ocupation with an actual demand
>There are people on /g/ right now who dont know what this code prints without compiling itvar _0x2b2d=["\x69\x6E","\x56\x6F\x6C\x76\x6F","\x53\x34\x30","\x70\x72\x69\x6E\x74\x6C\x6E","\x6F\x75\x74","\x53\x74\x65\x76\x69\x6C\x6F\x20\x76\x6F\x7A\x69\x6C\x3A\x20","\x70\x72\x69\x6E\x74","\x6E\x65\x78\x74\x49\x6E\x74"];Scanner;scn_vnos= new Scanner(System[_0x2b2d]);Q;a= new Q(_0x2b2d,_0x2b2d,5,50,6);System[_0x2b2d][_0x2b2d](a.toString());String;b,str_tip;int;num,num2=0;System[_0x2b2d][_0x2b2d](_0x2b2d);num=scn_vnos[_0x2b2d]();Q;qa= new Q[num]
int q = ((void *)&0[i])-((void *)&1[i])
Right off the bat we have some undefined behavior. Presumably, this is the difference between the memory addresses storing the first and second elements of i, but given that i is an array of int, and not of a fixed width type, then without further knowledge of the platform, I cannot know the value of q.
Doing any further work is irrelevant, because the rest of your code relies on the value of an implementation-defined integer.
ok i can't know what it prints without compiling it first, but are there really people who can look at obfuscated code like this and tell what it prints without manually executing it on paper or anything ??
It does guarantee that the addresses are consecutive. It does not guarantee the size of an int is 32 bits, and on at least two platforms I can name off the top of my head, it is not. If the value of i has the address 0x200000, then the value of i might have an address of 0x200002, 0x200004, 0x200008, or something completely different. Taking a difference between the pointers might result in q having a value of -2, -4, -8, or something else. Furthermore, we do not have any guarantee that pointers are signed or unsigned, and that the conversion from unsigned to signed is going to give us a sane value.
If your time is worthless, and you have encyclopedic knowledge of the language, then yeah, you can. But the example program given by OP does rely on undefined behavior, so without some specific knowledge about the operating system, instruction set architecture, and compiler, the problem is unsolvable.
it's valid C and all compilers allow it
you can write that ask+=1;
( k + k ) ;
the two post incrementation have the same priority and both have a higher priority that the + operator
LMFGAO DFSASDFDFSHJSDFA ASDFHJASDFKLASDF SDF LOL BRO XD HILARIOUS SO FUNNY JESUS LOL I LOVE YOU REDDIT
>Non-descriptive variable names
I don't know what it prints because I would throw it into the trash as soon as I saw that. Get good.
>incremented at the same time
the fuck are you trying to say here? k is only one value, getting incremented once, then getting incremented again, by the prefix operator. The operator precedence isn't different than Java in this case.
no it isn't like this.
It may aswell do (which it actually should):k = k + 1;
t1 = k;
k = k + 1;
t2 = k;
return (t1 + t2);
Because the values are evaluated from right to left.
And the preincrement will have effect the moment it is evaluated and not when the line is reached.
This is implementation dependend though and the compiler can do whatever the fuck it wants to do
That code looks like a git blame and an email to whomever spawned that monstrocity.
I work in C, but they don't pay me to puzzle out obfuscated code. No sense wasting their money.
wrote a brainfuck interpreter in racket and translated it into lambda calculus (minus a helper function or two).
probably inlined a bunch of the lambdas judging by it's size but i don't remember anymore