Thread: Merry Christmas!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Matticus View Post
    Sounds like an off-by-one error to me...
    So we agree then, that 25 is an off-by-one error? 24 is the correct number.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Quote Originally Posted by Elysia View Post
    So we agree then, that 25 is an off-by-one error? 24 is the correct number.
    No, you're wrong. I even confirmed it with a program.

    Code:
    #include <stdio.h>
    
    int main(void)
    {
        int xmas = 25;
    
        printf("xmas is on December %dth\n",xmas);
    
        return 0;
    }
    Output:

    Code:
    /*
        xmas is on December 25th
    */

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Merry Christmas!
    By Dino in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 12-25-2008, 09:39 PM
  2. Merry Christmas!
    By sean in forum A Brief History of Cprogramming.com
    Replies: 36
    Last Post: 12-25-2004, 11:40 PM
  3. Merry Christmas, y'all
    By salvelinus in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 12-26-2002, 08:50 PM
  4. Merry Christmas Everyone!!
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 12-27-2001, 03:34 PM
  5. Merry Christmas!!
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-12-2001, 10:49 PM