1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

segmentation fault when opening file

Discussion in 'C' started by Sheeba_Kumar, Jun 26, 2012.

  1. Sheeba_Kumar

    Sheeba_Kumar New Member

    Joined:
    Jun 26, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I'm doing code in c language
    I get segmentation fault when i try to open a file that contains 1000 lines similar to this

    1,2,1,5,6,7 (I have six integers in every line separated by comma)
    What is the maximum limit to read using fopen in c?
     
  2. sirama

    sirama New Member

    Joined:
    Jun 18, 2012
    Messages:
    7
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Systems Er.
    Home Page:
    Some piece of code is required for somebody to help you. You will not satisfy if a person replies "Check the fopen function".
     
  3. Sheeba_Kumar

    Sheeba_Kumar New Member

    Joined:
    Jun 26, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I have found the answer.please stop this thread
     
  4. Sheeba_Kumar

    Sheeba_Kumar New Member

    Joined:
    Jun 26, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    thank you. i figured out the fault. my file pointer was null and i was trying to close it
     

Share This Page