0 means nothing. Except when it does.

It is time for another C programming pop quiz…

    if (123 > 0123)
    {
        printf ("123 > 0123\n");
    }
    else
    {
        printf ("It is not.\n");
    }

What would it print?

2 thoughts on “0 means nothing. Except when it does.

  1. MiaM

    Coming from 6502 and 68000 assembler, the I found the C notation of hex and especially octal kind of backwards/wrong. Having a $ before hex numbers, % before binary numbers and skipping octal completely makes more sense to me.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *