Thread: binary number ...

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    5

    binary number ...

    HI, I know this is really easy, but I'm stomped.

    I need a nested for loop to write the first 32 binary numbers into a 32x5 elemented array .... anyone know how??

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    As in
    "00000"
    to
    "11111"
    ?

    Which really needs 32x6 to store as string.

    Discussed in the past couple of days, look around the board.

  3. #3
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    Location
    Germany.Stuttgart
    Posts
    65
    Based in the assumption that your array is a char array, i'd using suggest sprintf() or snprintf().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 10-07-2006, 05:37 AM
  2. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  3. large binary number division
    By nappaji in forum C Programming
    Replies: 3
    Last Post: 08-08-2006, 01:54 PM
  4. large binary number division
    By nappaji in forum C++ Programming
    Replies: 1
    Last Post: 08-08-2006, 12:01 AM
  5. Printing total of 1's in binary number
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 11-18-2001, 02:50 PM