Really quick

This is a discussion on Really quick within the C Programming forums, part of the General Programming Boards category; What would be the value of this expression !(13%7 == 24%9)?...

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    3

    Really quick

    What would be the value of this expression !(13%7 == 24%9)?

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Why not test it and see? "really quickly". Either that, or do simple maths and simple logic.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    !6 == 6) evaluates to !TRUE or FALSE.

    With all the things to learn in programming, why is this kind of trivia seen as important, though?

    Not always needed, but logical expressions like this should be grouped by their own parenthesis:

    !((13%7) == (24%9))
    Last edited by Adak; 02-11-2010 at 05:37 AM.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    5 seconds to try.
    30 minutes for a forum reply (ohh, poetry)

    Go figure....
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,639
    I am going to guess he could not test it because this person was IN a test and didn't have access to the computer, but did have access to his iPhone/Blackberry/other handheld. Hence the "really quick" subject. If that's the case I hope the cheater failed.

  6. #6
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Wouldn't they say phones... are not allowed during a test?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  7. #7
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Quote Originally Posted by cpjust View Post
    Wouldn't they say phones... are not allowed during a test?
    Sure. But they usually allow you to go to the toilet. My university puts alarms in the toilets though, that sound when they pick up mobile signals. Many people have been caught that way

  8. #8
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,639
    Sweet, zacs! Good to know, but I bet that's a rare occurrence. I know I've seen questions here and elsewhere before where someone was in some sort of timed test looking for a quick answer...this one struck me as that sort of situation.

  9. #9
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    BBC News - Hi-tech exam cheating increases says Ofqual
    Notice the bluster over the 0.03% detection rate.

    I wonder what that actual undetected cheating rate is.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 07:48 PM
  2. Do you know...
    By davejigsaw in forum C++ Programming
    Replies: 1
    Last Post: 05-10-2005, 10:33 AM
  3. Questions on basic Quick Sort
    By Weng in forum C++ Programming
    Replies: 4
    Last Post: 12-16-2003, 09:06 AM
  4. Quick Sort Help
    By NavyBlue in forum C Programming
    Replies: 1
    Last Post: 03-02-2003, 09:34 PM
  5. Replies: 0
    Last Post: 04-30-2002, 07:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21