<p>I am new to C and i have this question. why does the following code crash:</p>

<pre><code>int *a = 10;
*a = 100;
</code></pre>

You need to assign the pointer to a
memory location
, not arbitrary value (10).
```
```
int cell = 10;
int *a = &cell; // a points to address of cell
*a = 100;       // content of cell changed
```
```
See
my answer
to another question, about being careful with
C
.