Q:

Segmentation fault in C, can't figure why

I have a function that is supposed to read (in a very bad way) a file. I expect it to modify a struct that I pass as a parameter to store the things that it has to read. But when I call it, it throws a segmentation fault. I have a print as the first thing the function does, and it doesn't do it. So I guess I have a problem with the declaration of the function or something. I can't figure it out.
int main(int argc, char **argv){
    //some parser here
    struct client_config *config;
    read_software_config_file(*config); //I also passed it as non pointer and & but nothing worked.
    } 

void read_software_config_file(struct client_config config){
    printf("Hello"); //it breaks here
  }

As someone pointed out I did this:
 struct client_config config;
 read_software_config_file(&config);

But it still shows me segmentation fault.

A:

Here is a working example:
#include <stdio.h>

struct client_config
{
    int data;
};

void read_software_config_file(struct client_config *config); // Forward Declaration

int main(int argc, char **argv)
{
    struct client_config config; // Memory on stack. Use malloc/calloc for heap
    config.data = 10; // Init data
    read_software_config_file(&config);
    printf("config.data = %d\n", config.data);

    return 0;
}

void read_software_config_file(struct client_config *config)
{
    printf("Hello\n");
    config->data = 12;
}

I would generally advise to compile with -Wall -Wextra -pedantic to catch errors early.
You have to forward declare the function read_software_config_file (or include a header etc.) s.t. the compiler knows the signature when you call it in main.
As said in the comments you should take a pointer to the struct, s.t. it can be modified.
The output after running main is:
Hello
config.data = 12

