I don't understand why I am getting "Segmentation fault (core dumped)" error
<p>I am writing a C program which searches for a string inside a file. When I compile and execute the program from the command line, I get the segmentation fault error. I know that this error means that I do not have access to the memory I am trying to write to, but I do not see how this is occurring in my program. Here is the segment of code in my <code>main</code> function where the error is occurring:</p>

<pre><code>int num_of_arguments = argc;
char *filename = argv[2];
char *search_string;

strcpy(search_string, argv[1]);

int i = 0;
while (search_string[i]) {
    tolower(search_string[i]);
    i++;
}
</code></pre>