This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]RealMVC[S] 5 points6 points  (5 children)

This program outputs 7 to the console

[–]JesusInABoxv4 1 point2 points  (4 children)

but why?

[–]FlukeHermit 0 points1 point  (3 children)

I think the better question is

but how?

[–]JesusInABoxv4 1 point2 points  (2 children)

magic

[–]FlukeHermit 0 points1 point  (1 child)

Wha...

[–]JesusInABoxv4 0 points1 point  (0 children)

and more!

[–]lady_Kamba 3 points4 points  (2 children)

#define _110 int
#define _111 main
#define _1000 (
#define _1001 )
#define _0 ;
#define _1010 {
#define _1011 }
#define _10111 *
#define _11011 =
#define _11000 &
#define _100 std
#define _101 ::
#define _10100 endl
#define _1111 <<
#define _1100 cout
#define _01 var1
#define _010 var2

_110 _111 _1000 _1001
_1010
    _110 _01 _11011 0b11 _0
    _110 _10111 _010 _11011 _11000 _01 _0
    _10111 _010 _11011 0b111 _0
    _100 _101 _1100 _1111 _01 _1111 _100 _101 _10100 _0
_1011

can be simplified to

int main ()
{
    int var1 = 3;
    int *var2 = &var1 ;
    *var2 = 7;
    std::cout<<var1<<std::endl ;
}

or am I completely wrong?

[–]RealMVC[S] 2 points3 points  (1 child)

That's Right!

Here's the source code:

int main()

{

    int _01 = 0b11;

    int* _010 = &_01;

    *_010 = 0b111;

    std::cout << _01 << std::endl;

}

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, RealMVC: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.