Thread: 8 digits in index of array??

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    33

    8 digits in index of array??

    hi
    I am trying to store 8digits in one array index, but it can only shows up to 6.. how can I change that?

    Code:
    double array[]={80702001,40,70,60,55.5}
    I get 8.0702e+07 for the first one the rest are ok..

    thanks

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    109
    What are you using to display the number?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Check the width and precision you're using to print floats.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Incrementing array index in a node.
    By JFonseka in forum C Programming
    Replies: 8
    Last Post: 04-15-2008, 03:39 AM
  2. Getting rid of array index brackets
    By jtullo in forum C Programming
    Replies: 3
    Last Post: 04-22-2007, 12:16 AM
  3. 2d array question
    By gmanUK in forum C Programming
    Replies: 2
    Last Post: 04-21-2006, 12:20 PM
  4. Reversing character array without accessing thro' index.
    By Roaring_Tiger in forum C Programming
    Replies: 8
    Last Post: 08-28-2004, 10:52 AM
  5. file index update error
    By daluu in forum C Programming
    Replies: 1
    Last Post: 04-28-2003, 02:47 AM