int QSget_basis_array (QSprob p, char *cstat, char *rstat)
/* p is an initialized QSprob, a handle to an existing LP problem  */

int rval, ncols, nrows;
char *cstat, *rstat;

ncols = QSget_colcount (p);
nrows = QSget_rowcount (p);

cstat = (char *) malloc (ncols * sizeof (char));
rstat = (char *) malloc (nrows * sizeof (char));

rval = QSget_basis_array (p, cstat, rstat);
if (rval) {
    fprintf (stderr, "Could not get the basis, error code %d\n", rval);
} else {
    /* The basis information is stored in the arrays. */
}

free (cstat);
free (rstat);