Tits in C

1207356455123.png (55 KB)

“Yea. I said it. In C.”

  • Leave a comment ?

    14 Responses to Tits in C

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

      Reply

    2. S0 boobies fail as well?

      I think not.

      Reply

    3. Tits can not fail.

      Exception: National Geographic tits.

      Reply

    4. 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

      Reply

    5. 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.

      Reply

    6. 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.

      Reply

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

      Reply

    8. @ 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.

      Reply

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

      Reply

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

      Reply

    11. 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”.

      Reply

    12. @goatsgomoo

      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.

      Reply

    13. Nerds…

      You are so fucking hilarious.

      Reply

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

      Reply

    Leave a Comment




    Advertisements Alcohol Animated Images Art Awesome Things Batman Cars Comic Books Computers Cosplay Cute As Hell Animals Dark Humor Donald Trump Fantasy - Science Fiction Fashion Food Forum Fodder Gaming Humor Interesting LOLcats Military Movie Posters Movies Music Nature NeSFW Politics Religion Sad :( Science! Sexy Space Sports Star Trek Star Wars Technology Television Vertical Wallpaper Visual Tricks Wallpaper Weapons Women WTF X-Mas