Trick question

May 15, 2012

I just came up with a trick question. Let’s see if you can solve it.

Why will 20 become smaller when you add another zero?

Update: Commenters have been very creative. My original solution was to add the zero at the front, yielding “020”, which is 16 in many programming languages. Other solutions are “20^0 = 1″ include “0.20”.

About these ads

17 Responses to “Trick question”

  1. Wolfgang Rohdewald Says:

    by convention, 20 is decimal and 020 is octal

  2. B-ZaR Says:

    Because 020 is octal for 16d?

  3. Loreia Says:

    020 is octal notation stands for 16 in decimal notation

  4. Anonymous Says:

    The typical smartypants answer is “because I added it to the left”, but since it requires adding a period too for it to make sense, I guess it’s not what you’re looking for.

  5. David Says:

    Because in the C language 020 is 16 in base 10.

  6. raymck1 Says:

    20⁰ (20 exponent 0) = 1, also.

  7. eno Says:

    20^0

  8. RollerBitch Says:

    Depends on the meaning of “add”, you can add a 0 as exponent and get 1 :D

  9. Pedro Says:

    (char)20 > (char)200

  10. renoX Says:

    Because KR made a stupid mistake? The octal notation should have been killed with fire a long time ago..

    • Kevin Says:

      The problem is not the octal notation, the problem is not using an alphabetical character for markup like in the case of hex.
      o20 or c20 or whatever

  11. Dnascimento Says:

    20º = 1

  12. Francesco R. Says:

    yay for `chmod 0x1c0 /root`

  13. StuieT Says:

    20^0=1


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.