Using the File to search string

HI All,

Am searching strings in a file, getting the string from data base in the code.
If i take 10 strings as search input from data base am getting the output correct, if am taking more than 10 strings as input am getting a Memory fault(coredump) Error.

In the code am using fopen() for opening file once and using fseek() to make the file pointer to point to beginning of file once i searched first string then i repeat the same till the end of the search strings.

Please help me with the solution for the problem.

  1. Are you checking all of your return values? (If you think a function doesn't have a return value to indicate error, double-check the man page)
  2. Have you tried using a debugger?
  3. Otherwise, post some code (as succinct as possible) that exhibits the problem, or it could be one of a million things.