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:
    http://www.mstecharticles.com
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice