/* * really simple example of function using pointer parameters */ #include void divide(int a, int b, int *quotient, int *remainder) { *quotient = a / b; *remainder = a % b; } int main(void) { int a, b, q, r; printf("enter ints\n"); if (scanf("%d %d", &a, &b) == 2) { printf("a = %d, b = %d\n", a, b); divide(a, b, &q, &r); printf("q = %d, r = %d\n", q, r); } else { printf("not ints\n"); } return 0; }