ITT: Prove you can pass the first question on a programming test that these pajeets passed

ITT: Prove you can pass the first question on a programming test that these pajeets passed.

//Complete the function such that a and b switched.
//Memory is limited.
//Your compiler has no optimisations.
void swap(unsigned int &a, unsigned int &b) {
a = (a > 255 ? 255 : a);
b = (b > 255 ? 255 : b);
//Your code here.
}

int main(void) {
swap(5, 3);
return 0;
}

Attached: p3.jpg (415x315, 129K)

unsigned int temp = a;
a = b;
b = temp;


When do I get the job?

Welcome to 4channel dot org
You can post code in monospace font using [ code ] tags

//Complete the function such that a and b switched.
//Memory is limited.
//Your compiler has no optimisations.
void swap(unsigned int &a, unsigned int &b)
{
a = (a > 255 ? 255 : a);
b = (b > 255 ? 255 : b);
//Your code here.
}

int main(void)
{
swap(5, 3);
return 0;
}


I have reformatted your code to GNU C standard
We hope you enjoy your stay on 4channel dot org

Attached: image.png (367x554, 27K)

You don't. You fucked up.

>your compiler has no optimizations
>using a branch to clamp to 255 instead of a bitwise and
I'll be taking your job now. You're fired.

Pajeets must have gotten their food stamps today because the grocery store was literally flooded with them.

Some fat pajeet chick literally did that weird head wobble shit and walked past me, her husband stopped his cart and just stood there smiling at me.

I coughed and said pajeet under my breath and holy shit the look on his face. I honestly thought it was some kind of Jow Forums meme but they fucking know. He literally made a loud aaaaaaarg sound and freaking slid his cart sideways to go around me and his wife started bitching him out.

eh small unsigned int makes it kinda boring, next time try near overflow doubles or something
a = a | (b 8;
or however the fuck the syntax for that goes it's 4 am and i'm only here because insomnia.

if it were doubles at least we'd have to do math using deltas and shit with edge cases

>giving an rvalue to non-const reference parameters
yea we'll call you

This doesn't even compile Pajeet.

I'll just take the job that consists of leading the team, i.e. sitting on my ass in my office while the pajeets slave away in their cubicles.

>4channel dot org
Welcome to 4channel󠘁.󠘁org
Learn how to bypass, so󠘁yboy.

//lick deez nutz

This nigger is worthy of the pajeets.

This nigger is not. Task was to test whether candidates would pick up on this or not, and to indirectly imply that values couldn't exceed 255 to hint at the possible usage of bitwise. Instead, you thought you knew better than interviewer, pissed him off, and will continue to live in your mom's basement.

>not directly asking why they smell so bad

Coughing under your breath is weak shit man. What did we as humanity do to deserve pajeets?

How did you do that?

Wait what?
Are you trying to modify constants?

This is the most logical way to do it.

>ask was to test whether candidates would pick up on this or not, and to indirectly imply that values couldn't exceed 255 to hint at the possible usage of bitwise.
You are retarded. If we only have a char for our values why the fuck are you passing unsigned int? And even if unsigned int is 1 byte because of platform or shit you can't do .

Donald Trump is a good president....... i hope that his body guard are not in my machine....... i almost write, " Donald trump is very dumb....."

Attached: trollface-deal-with-it-troll-face.png (991x806, 105K)

>Using Shit++ references
>Memory is limited.
You are pic related.
kys you street shitting monkey.

Attached: pajeet.jpg (474x266, 26K)

4channel󠘁.󠘁org

What the fuck how?

Easy shit

//Complete the function such that a and b switched.
//Memory is limited.
//Your compiler has no optimisations.
void swap(unsigned int &a, unsigned int &b) {
a = (a > 255 ? 255 : a);
b = (b > 255 ? 255 : b);

a = a ^ b;
b = a ^ b;
a = a ^ b;
}

int main(void) {
swap(5, 3);
return 0;
}

probably ascii

basedboy
basedboy

basedboy
basedboy
basedboy

>there are people unironically solving his homework
The absolute state of Jow Forums

basedboy

>swap(1000, 500) ends with 255, 255 and doesn't even end with an error
Good job with your retarded function. If your use case was just numbers 0-255, you should have used unsigned chars, which would save you enough memory to use a third variable rather than hacky bullshit.

>tfw unironically writing base dboy instead of so yboy

just trying to figure out which invisible char works in 2019
basedboy

a^=b;
b^=a;
a^=b;

trolling? dumb tripfag filtered

in python this is just
a,b=b,a

//Complete the function such that a and b switched.
//Memory is limited.
//Your compiler has no optimisations.
void swap(unsigned int &a, unsigned int &b) {
a = (a > 255 ? 255 : a);
b = (b > 255 ? 255 : b);
std::swap(a,b);
}

int main(void) {
swap(5, 3);
return 0;

4channel.org

Go fuck yourself you fucking cunt, learn something new faggot.

Attached: .jpg (1080x879, 92K)

>void main

Attached: 1542089313140.jpg (493x386, 33K)

if (a>b){
a=a-b;
b=a+b;
a=b-a;
}

Then do it backwards if b>a I'm not gonna type it out again

if b>a you can just swap the variables before proceeding to have it work as intended

>just swap the variables before swapping the variables
Kekked

pajeets dont use food stamps. they all make more than 60000 combined, even the h1bs.
probably there to buy veggies for the week. homemade food is the best.
Also my brown wife is coming here next year, we are gonna be making close to 185000 combined in a couple years.
life is easy mode stay seething whitecel while I populate this land with my brown kids.
>t. java spring curryboi

std::swap(a, b);