255

This is a discussion on 255 within the Tech Board forums, part of the Community Boards category; Maybe this question is not related to C language at all, maybe is. I wonder why in excel number of ...

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    26

    255

    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?

    Thanks.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    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-27-2009, 12:42 AM
  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, 08:30 AM
  4. reading pictures and array
    By sunoflight77 in forum C++ Programming
    Replies: 0
    Last Post: 05-09-2005, 04: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, 05:26 PM

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