There are actually three errors and one potential pitfall in this code.
First, you are creating an uninitialized pointer to a structure. I think you meant do just say:
Second, you are creating a buffer of 4 bytes, the size of an int, instead of "10".
If you wanted to create an array of 10 bytes, you would just say
st->s = (char *) malloc(sizeof(10));
st->s = (char *) malloc(10);
That is still risky though as it is not tied to the length of the string (if you later changed the string length, you would also have to update the buffer). So better than that, you could write
st->s = (char *) malloc(10 * sizeof(char));
Still better though, you could use the strdup function, which does all that for you:
st->s = (char *) malloc(strlen("bargi") * sizeof(char) + 1 /* terminator */ );
The third bug is that after creating memory for a string, you leaked that buffer when you assigned st->s to a new const string "bargi".
st->s = (char *) strdup("bargi");
You don't state the actual crash, but it was probably due to dereferencing the uninitialized st pointer