Thread: 255

  1. #1
    Registered User
    Join Date
    Apr 2004


    Maybe this question is not related to C language at all, maybe is. I wonder why in excel number of columns is 255 and maximum number of characters for naming file is 255. Is there any connection?


  2. #2
    Registered User
    Join Date
    Sep 2004
    If you have an 8 bit number, it can count up to 255. I'm guessing whoever programmed excel used an 8 bit variable to store the number of columns. As for the character limit, the programmers probably created the buffer which stores the file name as a size of MAX_PATH. On some windows implementations, this is equal to 256 (255 characters, plus one null terminator).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. "Nearest value" algorithm?
    By Boxknife in forum C Programming
    Replies: 10
    Last Post: 06-26-2009, 11:42 PM
  2. Dynamically allocating 3D array
    By ssharish2005 in forum C Programming
    Replies: 8
    Last Post: 02-26-2008, 04:07 PM
  3. strange number problem
    By kkjj in forum C Programming
    Replies: 9
    Last Post: 08-09-2007, 07:30 AM
  4. reading pictures and array
    By sunoflight77 in forum C++ Programming
    Replies: 0
    Last Post: 05-09-2005, 03:16 PM
  5. If the RGB color is (64, 64, 255), change it to (64, 255, 64).
    By Grayson_Peddie in forum C# Programming
    Replies: 2
    Last Post: 06-14-2003, 04:26 PM