int QSget_slack_array (QSprob p, double *slack)
/* p is an initialized QSprob, a handle to an existing LP problem  */

int rval, nrows;
double *slack;

nrows = QSget_rowcount (p);
slack = (double *) malloc (nrows * sizeof (double));

rval = QSget_slack_array (p, slack);
if (rval) {
    fprintf (stderr, "Could not get slacks, error code %d\n", rval);
} else {
    /* See QSget_solution() to print named slack values */
}

free (slack);