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. }
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
>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.
Aaron Jones
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.
John Martin
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
Asher Richardson
>giving an rvalue to non-const reference parameters yea we'll call you
Carson Lopez
This doesn't even compile Pajeet.
David Lewis
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.
Carter Rodriguez
>4channel dot org Welcome to 4channel.org Learn how to bypass, soyboy.
Tyler Butler
//lick deez nutz
Cooper Ward
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.
Michael Ward
>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?
Nolan Morris
How did you do that?
Owen Phillips
Wait what? Are you trying to modify constants?
Jaxson Richardson
This is the most logical way to do it.
Jason James
>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 .
Carter Hall
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....."
//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; }
Liam Morgan
probably ascii
Landon Price
basedboy basedboy
Nicholas James
basedboy basedboy basedboy
Easton Hernandez
>there are people unironically solving his homework The absolute state of Jow Forums
Wyatt Baker
basedboy
Charles Edwards
>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.
Robert Flores
>tfw unironically writing base dboy instead of so yboy
Gabriel Ross
just trying to figure out which invisible char works in 2019 basedboy
Parker Martinez
a^=b; b^=a; a^=b;
Parker Johnson
trolling? dumb tripfag filtered
Sebastian Lee
in python this is just a,b=b,a
Ayden Green
//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;
Asher Lee
4channel.org
Alexander Sanders
Go fuck yourself you fucking cunt, learn something new faggot.
Then do it backwards if b>a I'm not gonna type it out again
Chase Green
if b>a you can just swap the variables before proceeding to have it work as intended
Connor Bell
>just swap the variables before swapping the variables Kekked
Gavin Richardson
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