Tits in C

1207356455123.png (55 KB)

“Yea. I said it. In C.”


Send to Facebook | Send To Twitter
  • Twitch

     

  • Leave A Comment

    Subscribe
    Notify of
    14 Comments
    Inline Feedbacks
    View all comments
    THE_GTC

    That’s the most manly bit of code I have ever seen. Shit that’s Goddamn Batmanly. Win.

    The Lawnmower

    S0 boobies fail as well?

    I think not.

    Frznagn

    Tits can not fail.

    Exception: National Geographic tits.

    Ronwe

    My knowledge of C is pretty much nonexistent, but the way that that code reads to me is that if the answer contains the letter ‘t’ it will say fail. So, even if they do reply with ‘tits’ it still says fail at them.

    Now, if I’ve read this right, and by all means I’m not sure I have… As I said, I have very little knowledge of C coding, but if I’ve read it right, then this = fail

    angrymatt

    Sorry Ronwe, the way it works is if the answer doesn’t start with the character ‘t’ it fails. Ifsofacto, turds would be win in this case. Methinks Sudden_Urge needs to go back to school and learn some regex before he can win.

    Lord_Gorlock

    I will revel in my nerdiness and point out that this bit of code would never compile because main needs to return an int. Also, the variable “ans” should be type “char”, not type “int”, although it might be possible that getchar() is storing the integer ASCII value for the letter, but then the conditional statement wouldn’t be valid. Obviously, I’ve made my point about the level of my nerd-dom.

    All that said, the post is still hilarious.

    Jaypeezy

    ^^^ Wow, I just barely understand what you’re saying

    Tony

    angrymatt

    Regular expressions ftw. The code is sloppy and therefore not as “Win” as it could be.

    Lord_Gorlock

    Yeah, there isn’t a reason why main() should return anything in this case. It should be void. And the var type inconsistencies are lame.

    Stolid

    OK Perl golfers.. lets see a 1 liner..

    Tony

    Stolid
    And that is what I need to learn, and master, Perl.
    So, what is the code in Perl? In one line, of course.

    goatsgomoo

    Lord_Gorlock:
    “Also, the variable “ans” should be type “char”, not type “int”, although it might be possible that getchar() is storing the integer ASCII value for the letter, but then the conditional statement wouldn’t be valid.”

    Actually, that part is fine.
    getchar returns the ASCII value. ‘t’ is the ASCII value of the letter t, so ‘t’ == 116 == 0x74.
    Also, a char is just an 8-bit integer. You can assign numbers to a char just as you can assign letters to an int. You can also compare ints to letters just as you can compare chars to numbers. They’re all numbers.

    Basically, it works.

    Ronwe:
    “but the way that that code reads to me is that if the answer contains the letter ‘t’ it will say fail.”

    != is “not equal to”, not “equal to”.

    Lord_Gorlock

    Yeah, I realized my error in this later. Still, if you only need 8 bits, use an 8-bit data type :-p.

    Wow, critiquing fake code. I really need to find a better hobby :-D.

    unknown

    Nerds…

    You are so fucking hilarious.

    Phyreblade

    LOL wow… I’m glad my self restraint paid off… I was sorely tempted to join in the nerdfest of phail…

  • Here's a few awesome images!