1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Rep Power

    Read a huge text file >20MBthorugh C

    I m trying to read a text file (>20MB in size) through C. The file is created by the statement:
    I m trying to read this file using the following statement:
    where double r[9]; is an array and int i; is a loop variable. But each time i m getting 0.0000000000 as an output for each read. Please suggest me a solution in C only.
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    You don't happen to get warnings from fscanf when you compile the program? These could be important.

    warning: zero width in gnu_scanf format [-Wformat]
    warning: unknown conversion type character . in format [-Wformat]
    warning: too many arguments for format [-Wformat-extra-args]

    Without providing too many hints, why don't you try a scanf conversion similar to
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo