Why is this producing a segmentation fault? : <p>I'm not sure why the following is producing a segmentation fault. I've defined a structure and I'm trying to store a value to it.</p>

<pre><code>typedef struct {
    int sourceid;
    int destid;
} TEST_STRUCT;

void  main( int argc, char *argv[] )  {
    TEST_STRUCT *test;
    test-&gt;sourceid = 5;
}
</code></pre>
