// an example of a function that computes three "results", and stores // the values of those results in three output arguments. #include #include void compute_three_products(int x, int * first, int * second, int * third) { *first = x * (x + 1); *second = *first * (x + 2); *third = *second * (x + 3); } int main() { int a = 10; int x1, x2, x3; compute_three_products(a, &x1, &x2, &x3); printf("x1 = %d, x2 = %d, x3 = %d\n", x1, x2, x3); }