Previous      Next

//  Better Now!!

int *threeMultiply (int n, int *r)
{
   *r = (3*n);
   return r;
}

void main ()
{
   int int_space_1;
   int int_space_2;   
   int *x;
   int *y;
   
   x = threeMultiply (9, &int_space_1);
   y = threeMultiply (10, &int_space_2);
   printf("\nValue of 9*3: %d, 10*3: %d\n", *x, *y);
}

// Sample Output:
//   Value of 9*3: 27, 10*3: 30