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

int rval, nrows;
double *rhs;

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

rval = QSget_rhs (p, rhs);
if (rval) {
    fprintf (stderr, 
             "Could not get right-hand-side, error code %d\n", rval);
} else {
    printf ("Right-Hand-Side\n");
    for (i = 0; i < nrows; i++) {
        printf ("%f\n", rhs[i]);
    }
}

free (rhs);