Unable to load image

Are you a C++ Chad?

After having my abilities been questioned by @iStillMissEd , i decided to create a little test to separate the chads from the chaff.

Here's a small snippet of c++ code:

bool function1(int8_t a, int8_t b)

{

int8_t aneg=-a;

int8_t bneg=-b;

return((a<b)==(aneg>bneg));

}

Describe when and why this function returns true. Best answer gets 250DC. No answer and you will be known as a javargin. !codecels

38
Jump in the discussion.

No email address required.

I haven't used C++ since college but isn't this literally an identity?

3 < 5 so -3 > -5

Jump in the discussion.

No email address required.

This is the brainlet answer. :marseybrainlet::marseylaugh:

I saw your upvote @iStillMissEd. IT NEVER EVEN BEGAN FOR YOU.

Jump in the discussion.

No email address required.

I saw your upvote @iStillMissEd. IT NEVER EVEN BEGAN FOR YOU.

>implying i read what I vote on

Jump in the discussion.

No email address required.

how is this the brainlet answer? is there some r-sluration of c++ that I'm missing?

Jump in the discussion.

No email address required.

is there some r-sluration of c++ that I'm missing?

Do you really have to ask this?

Jump in the discussion.

No email address required.

yes!i will edit the answer in tomoroow.

Jump in the discussion.

No email address required.

Oh I thought you were asking "why does this function return true" :marseybrainlet:

Jump in the discussion.

No email address required.

Yeah.

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.