Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   segmentation fault when opening file (http://www.go4expert.com/forums/segmentation-fault-file-t28626/)

Sheeba_Kumar 26Jun2012 09:17

segmentation fault when opening file
 
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?

sirama 26Jun2012 12:29

Re: segmentation fault when opening file
 
Some piece of code is required for somebody to help you. You will not satisfy if a person replies "Check the fopen function".

Sheeba_Kumar 26Jun2012 13:24

Re: segmentation fault when opening file
 
I have found the answer.please stop this thread

Sheeba_Kumar 26Jun2012 13:25

Re: segmentation fault when opening file
 
Quote:

Originally Posted by sirama (Post 95913)
Some piece of code is required for somebody to help you. You will not satisfy if a person replies "Check the fopen function".

thank you. i figured out the fault. my file pointer was null and i was trying to close it


All times are GMT +5.5. The time now is 11:18.